From 9688214ba76955de6427ca3a0d716be6443f8cc0 Mon Sep 17 00:00:00 2001 From: Leif Walsh Date: Wed, 17 Apr 2013 00:01:17 -0400 Subject: [PATCH] refs #5671 fix a memory leak in test helpers git-svn-id: file:///svn/toku/tokudb@50124 c7de825b-a66e-492c-adef-691d508d4ae1 --- ft/ft-test-helpers.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ft/ft-test-helpers.cc b/ft/ft-test-helpers.cc index d2647ab9ccf..293a0ebe40a 100644 --- a/ft/ft-test-helpers.cc +++ b/ft/ft-test-helpers.cc @@ -44,7 +44,7 @@ int toku_testsetup_leaf(FT_HANDLE brt, BLOCKNUM *blocknum, int n_children, char } for (i=0; i+1childkeys[i], toku_xmemdup(keys[i], keylens[i]), keylens[i]); + toku_memdup_dbt(&node->childkeys[i], keys[i], keylens[i]); node->totalchildkeylens += keylens[i]; } @@ -65,7 +65,7 @@ int toku_testsetup_nonleaf (FT_HANDLE brt, int height, BLOCKNUM *blocknum, int n BP_STATE(node,i) = PT_AVAIL; } for (i=0; i+1childkeys[i], toku_xmemdup(keys[i], keylens[i]), keylens[i]); + toku_memdup_dbt(&node->childkeys[i], keys[i], keylens[i]); node->totalchildkeylens += keylens[i]; } *blocknum = node->thisnodename;