mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
refs #5671 fix a memory leak in test helpers
git-svn-id: file:///svn/toku/tokudb@50124 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
3ebf117c33
commit
9688214ba7
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue