Commit 422cbaf0 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5671 fix a memory leak in test helpers


git-svn-id: file:///svn/toku/tokudb@50124 c7de825b-a66e-492c-adef-691d508d4ae1
parent d665f72d
...@@ -44,7 +44,7 @@ int toku_testsetup_leaf(FT_HANDLE brt, BLOCKNUM *blocknum, int n_children, char ...@@ -44,7 +44,7 @@ int toku_testsetup_leaf(FT_HANDLE brt, BLOCKNUM *blocknum, int n_children, char
} }
for (i=0; i+1<n_children; i++) { for (i=0; i+1<n_children; i++) {
toku_fill_dbt(&node->childkeys[i], toku_xmemdup(keys[i], keylens[i]), keylens[i]); toku_memdup_dbt(&node->childkeys[i], keys[i], keylens[i]);
node->totalchildkeylens += keylens[i]; node->totalchildkeylens += keylens[i];
} }
...@@ -65,7 +65,7 @@ int toku_testsetup_nonleaf (FT_HANDLE brt, int height, BLOCKNUM *blocknum, int n ...@@ -65,7 +65,7 @@ int toku_testsetup_nonleaf (FT_HANDLE brt, int height, BLOCKNUM *blocknum, int n
BP_STATE(node,i) = PT_AVAIL; BP_STATE(node,i) = PT_AVAIL;
} }
for (i=0; i+1<n_children; i++) { for (i=0; i+1<n_children; i++) {
toku_fill_dbt(&node->childkeys[i], toku_xmemdup(keys[i], keylens[i]), keylens[i]); toku_memdup_dbt(&node->childkeys[i], keys[i], keylens[i]);
node->totalchildkeylens += keylens[i]; node->totalchildkeylens += keylens[i];
} }
*blocknum = node->thisnodename; *blocknum = node->thisnodename;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment