From 165efc45ab5518033612a58c1ac51243eb6bcef8 Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Ahmed Date: Tue, 28 Dec 2010 01:14:19 +0000 Subject: nfs/server: unrefing inodes on error in nfs_loc_copy (). Signed-off-by: Junaid Signed-off-by: Anand V. Avati BUG: 2252 (unreffing of inodes not done when memory allocation fails) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2252 --- xlators/nfs/server/src/nfs-common.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xlators/nfs') diff --git a/xlators/nfs/server/src/nfs-common.c b/xlators/nfs/server/src/nfs-common.c index ef2d1d3fdf5..f109cdde590 100644 --- a/xlators/nfs/server/src/nfs-common.c +++ b/xlators/nfs/server/src/nfs-common.c @@ -187,6 +187,14 @@ nfs_loc_copy (loc_t *dst, loc_t *src) ret = 0; out: + if (ret == -1) { + if (dst->inode) + inode_unref (dst->inode); + + if (dst->parent) + inode_unref (dst->parent); + } + return ret; } -- cgit