diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2011-08-22 22:37:43 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-09-11 23:22:44 -0700 |
commit | a2ef31b01537d8edd5ecf3738967704b0a19b137 (patch) | |
tree | 8f3a76220bc5efce6709923bc2ed62b629a425c2 | |
parent | 02b30e294b46cf54edf005db5ce5b0c2dc75919f (diff) |
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 <vijay@gluster.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r-- | xlators/features/marker/src/marker.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 5299d2254af..89da0893295 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; } |