Commit e5e54eac authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5671 fix memory leaks


git-svn-id: file:///svn/toku/tokudb@50126 c7de825b-a66e-492c-adef-691d508d4ae1
parent 422cbaf0
...@@ -573,10 +573,7 @@ rebalance_ftnode_leaf(FTNODE node, unsigned int basementnodesize) ...@@ -573,10 +573,7 @@ rebalance_ftnode_leaf(FTNODE node, unsigned int basementnodesize)
LEAFENTRY CAST_FROM_VOIDP(curr_le_pivot, leafpointers[new_pivots[i]]); LEAFENTRY CAST_FROM_VOIDP(curr_le_pivot, leafpointers[new_pivots[i]]);
uint32_t keylen; uint32_t keylen;
void *key = le_key_and_len(curr_le_pivot, &keylen); void *key = le_key_and_len(curr_le_pivot, &keylen);
toku_fill_dbt(&node->childkeys[i], toku_memdup_dbt(&node->childkeys[i], key, keylen);
toku_xmemdup(key, keylen),
keylen);
assert(node->childkeys[i].data);
node->totalchildkeylens += keylen; node->totalchildkeylens += keylen;
} }
...@@ -1272,9 +1269,7 @@ deserialize_ftnode_info( ...@@ -1272,9 +1269,7 @@ deserialize_ftnode_info(
bytevec childkeyptr; bytevec childkeyptr;
unsigned int cklen; unsigned int cklen;
rbuf_bytes(&rb, &childkeyptr, &cklen); rbuf_bytes(&rb, &childkeyptr, &cklen);
toku_fill_dbt(&node->childkeys[i], toku_memdup_dbt(&node->childkeys[i], childkeyptr, cklen);
toku_xmemdup(childkeyptr, cklen),
cklen);
node->totalchildkeylens += cklen; node->totalchildkeylens += cklen;
} }
} }
...@@ -1717,9 +1712,7 @@ deserialize_and_upgrade_internal_node(FTNODE node, ...@@ -1717,9 +1712,7 @@ deserialize_and_upgrade_internal_node(FTNODE node,
bytevec childkeyptr; bytevec childkeyptr;
unsigned int cklen; unsigned int cklen;
rbuf_bytes(rb, &childkeyptr, &cklen); // 17. child key pointers rbuf_bytes(rb, &childkeyptr, &cklen); // 17. child key pointers
toku_fill_dbt(&node->childkeys[i], toku_memdup_dbt(&node->childkeys[i], childkeyptr, cklen);
toku_xmemdup(childkeyptr, cklen),
cklen);
node->totalchildkeylens += cklen; node->totalchildkeylens += cklen;
} }
......
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