summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-10-28 16:15:03 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-28 23:00:32 -0700
commit11dd6bcb416c2e937ced2b2bbd35fe10b21f283f (patch)
tree2d5354bb118cbc0dea049412ac92a5796e402701 /xlators/performance/io-cache
parentf513157e93bbba885f12f10ca2fb94424d7aea5e (diff)
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 <avati@dev.gluster.com> BUG: 335 (Io-cache optimization) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=335
Diffstat (limited to 'xlators/performance/io-cache')
-rw-r--r--xlators/performance/io-cache/src/ioc-inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/performance/io-cache/src/ioc-inode.c b/xlators/performance/io-cache/src/ioc-inode.c
index 7260def41..5ef2b648a 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;