From 11dd6bcb416c2e937ced2b2bbd35fe10b21f283f Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 28 Oct 2009 16:15:03 +0000 Subject: performance/io-cache: fix double free. - the destroyer function passed to rbthash_table_init is used to free the data. The data being inserted is page and it is destroyed in ioc_page_destroy. Hence no destroyer function needs to be passed to rbthash_table_init. Signed-off-by: Anand V. Avati BUG: 335 (Io-cache optimization) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=335 --- xlators/performance/io-cache/src/ioc-inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlators/performance/io-cache/src/ioc-inode.c b/xlators/performance/io-cache/src/ioc-inode.c index 7260def418e..5ef2b648a8d 100644 --- a/xlators/performance/io-cache/src/ioc-inode.c +++ b/xlators/performance/io-cache/src/ioc-inode.c @@ -177,7 +177,7 @@ ioc_inode_update (ioc_table_t *table, inode_t *inode, uint32_t weight) /* initialize the list for pages */ ioc_inode->cache.page_table = rbthash_table_init (IOC_PAGE_TABLE_BUCKET_COUNT, - ioc_hashfn, free); + ioc_hashfn, NULL); if (ioc_inode->cache.page_table == NULL) { FREE (ioc_inode); ioc_inode = NULL; -- cgit