mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 06:44:16 +01:00
refs #5671 fix memory leaks
git-svn-id: file:///svn/toku/tokudb@50126 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
9688214ba7
commit
ddc8d821c1
1 changed files with 3 additions and 10 deletions
|
@ -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(
|
||||||
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,
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue