From 91891cbbf63b260ca1a8ffd0d561ee87fb3239ac Mon Sep 17 00:00:00 2001 From: Leif Walsh Date: Wed, 17 Apr 2013 00:00:17 -0400 Subject: [PATCH] [t:4541] fix memory leak of cmp_descriptor git-svn-id: file:///svn/toku/tokudb@41610 c7de825b-a66e-492c-adef-691d508d4ae1 --- newbrt/brt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/newbrt/brt.c b/newbrt/brt.c index e6e1c295bbe..406347f1ca4 100644 --- a/newbrt/brt.c +++ b/newbrt/brt.c @@ -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,