From 98b32b5798c7d782cae4c16b608f600ab51fffce Mon Sep 17 00:00:00 2001 From: Junaid Date: Thu, 21 Jul 2011 23:51:45 +0530 Subject: features/marker-quota: Fix some random memory leaks. Change-Id: I1b01adf1d0ecf494f960d125f2bdcc9c10137115 BUG: 3169 Reviewed-on: http://review.gluster.com/75 Tested-by: Gluster Build System Tested-by: Raghavendra G Reviewed-by: Raghavendra G --- xlators/features/marker/src/marker.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/features/marker/src/marker.c') diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 84c13435..b4cf5080 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -935,7 +935,9 @@ marker_rename_done (call_frame_t *frame, void *cookie, xlator_t *this, newloc.inode = inode_ref (oplocal->loc.inode); newloc.path = gf_strdup (local->loc.path); - newloc.name = gf_strdup (local->loc.name); + newloc.name = strrchr (newloc.path, '/'); + if (newloc.name) + newloc.name++; newloc.parent = inode_ref (local->loc.parent); newloc.ino = oplocal->loc.inode->ino; -- cgit