summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker/src/marker.c
diff options
context:
space:
mode:
authorJunaid <junaid@gluster.com>2011-07-21 23:51:45 +0530
committerAnand Avati <avati@gluster.com>2011-07-28 01:58:49 -0700
commit3b60eea533f591517e874ccc36f2489baad42998 (patch)
treeb3f001c5451079959cb04869606d83c95086607f /xlators/features/marker/src/marker.c
parentcb44afa332a5f2aafa06a654d1f0ae4b1a9c728a (diff)
features/marker-quota: Fix some random memory leaks.
Change-Id: I1b01adf1d0ecf494f960d125f2bdcc9c10137115 BUG: 3169 Reviewed-on: http://review.gluster.com/73 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Raghavendra G <raghavendra@gluster.com> Reviewed-by: Raghavendra G <raghavendra@gluster.com>
Diffstat (limited to 'xlators/features/marker/src/marker.c')
-rw-r--r--xlators/features/marker/src/marker.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index 84c13435f..b4cf50800 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;