From a2ef31b01537d8edd5ecf3738967704b0a19b137 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Mon, 22 Aug 2011 22:37:43 +0530 Subject: features/marker: unref the local incase of errors before unwinding Change-Id: I4dcad7ddf84bf98b4b7f4a0e407a418426674280 BUG: 2784 Reviewed-on: http://review.gluster.com/299 Reviewed-by: Vijay Bellur Tested-by: Gluster Build System --- xlators/features/marker/src/marker.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'xlators/features') diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 5299d2254..89da08932 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -768,11 +768,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; @@ -784,8 +784,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; } @@ -820,8 +821,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; } -- cgit