From 63115897fe77e584552624c88f84eaeac55d9b57 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Thu, 2 Apr 2009 04:05:50 -0700 Subject: 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 --- xlators/cluster/unify/src/unify-self-heal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } } -- cgit