[t:4541] fix memory leak of cmp_descriptor

git-svn-id: file:///svn/toku/tokudb@41610 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Leif Walsh 2013-04-17 00:00:17 -04:00 committed by Yoni Fogel
parent 8d0368fd2f
commit 91891cbbf6

View file

@ -3474,6 +3474,9 @@ cleanup:
static void
brt_update_cmp_descriptor(BRT t) {
if (t->h->cmp_descriptor.dbt.data != NULL) {
toku_free(t->h->cmp_descriptor.dbt.data);
}
t->h->cmp_descriptor.dbt.size = t->h->descriptor.dbt.size;
t->h->cmp_descriptor.dbt.data = toku_xmemdup(
t->h->descriptor.dbt.data,