Commit ff96d32b authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel
Browse files

[t:4541] fix memory leak of cmp_descriptor

git-svn-id: file:///svn/toku/tokudb@41610 c7de825b-a66e-492c-adef-691d508d4ae1
parent a5dbbe4b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3474,6 +3474,9 @@ int toku_update_descriptor(struct brt_header * h, DESCRIPTOR d, int fd)

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,