summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-08-21 22:03:17 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-11 21:14:21 -0700
commita7dc1a97a29b29132081d8082c4c6f69f5c967f1 (patch)
tree54eb21f6c11bd975cbbe210f153b9164e3763e3a
parent307c3c4f6e98215cca12eb37d44c03ca1a30be3d (diff)
memleak fixes for marker
Change-Id: I33623f874fbf3a3c491322877ed54e99d3cfc623 BUG: 2784 Reviewed-on: http://review.gluster.com/298 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--xlators/features/marker/src/marker.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index d0f01465ffa..8f12dc83457 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -766,11 +766,11 @@ marker_unlink_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
{
marker_local_t *local = NULL;
+ local = frame->local;
if (op_ret < 0) {
goto err;
}
- local = frame->local;
if (local == NULL) {
op_errno = EINVAL;
goto err;
@@ -782,8 +782,9 @@ marker_unlink_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
FIRST_CHILD(this)->fops->unlink, &local->loc);
return 0;
err:
+ frame->local = NULL;
STACK_UNWIND_STRICT (unlink, frame, -1, op_errno, NULL, NULL);
-
+ marker_local_unref (local);
return 0;
}
@@ -818,8 +819,9 @@ unlink_wind:
FIRST_CHILD(this)->fops->unlink, loc);
return 0;
err:
+ frame->local = NULL;
STACK_UNWIND_STRICT (unlink, frame, -1, ENOMEM, NULL, NULL);
-
+ marker_local_unref (local);
return 0;
}