From b320532ca74643108df399663e3c002af3e0e219 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Wed, 6 Jul 2011 02:18:49 +0000 Subject: fd: put the fd back to fd_mem_pool of inode table instead of freeing in case of failure Signed-off-by: Raghavendra Bhat Signed-off-by: Anand Avati BUG: 3103 (memleak in inode table creation) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3103 --- libglusterfs/src/fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libglusterfs/src/fd.c') diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c index 1e65f2d8206..bbb774be492 100644 --- a/libglusterfs/src/fd.c +++ b/libglusterfs/src/fd.c @@ -521,7 +521,7 @@ fd_create (inode_t *inode, pid_t pid) fd->_ctx = GF_CALLOC (1, (sizeof (struct _fd_ctx) * fd->xl_count), gf_common_mt_fd_ctx); if (!fd->_ctx) { - GF_FREE (fd); + mem_put (inode->table->fd_mem_pool, fd); fd = NULL; goto out; } -- cgit