diff options
author | Shehjar Tikoo <shehjart@zresearch.com> | 2009-04-02 04:05:50 -0700 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-02 18:12:11 +0530 |
commit | 63115897fe77e584552624c88f84eaeac55d9b57 (patch) | |
tree | 7bd028e6df68eace3d96232cb4907368bee16c6f | |
parent | 26af4e1229106e3d4d311fcfa1646f1ce9f3f271 (diff) |
unify-self-heal: Fix un-ref'ing of incorrect dict
dict_unref'ing of the dict in local
results in a crash due to de-referencing a NULL spinlock.
That is because after a STACK_UNWIND(..), we cannot expect
the frame->local to be allocated still.
Fix by using the other available reference to local->dict.
Ref: https://savannah.nongnu.org/bugs/?26058
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
-rw-r--r-- | xlators/cluster/unify/src/unify-self-heal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/unify/src/unify-self-heal.c b/xlators/cluster/unify/src/unify-self-heal.c index 3099c646e2d..4e788fc7a1b 100644 --- a/xlators/cluster/unify/src/unify-self-heal.c +++ b/xlators/cluster/unify/src/unify-self-heal.c @@ -180,7 +180,7 @@ unify_sh_setdents_cbk (call_frame_t *frame, STACK_UNWIND (frame, local->op_ret, local->op_errno, inode, &local->stbuf, local->dict); if (tmp_dict) - dict_unref (local->dict); + dict_unref (tmp_dict); } } |