diff options
| -rw-r--r-- | xlators/cluster/stripe/src/stripe.c | 14 | 
1 files changed, 10 insertions, 4 deletions
diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c index 7ac131b2ca9..db363910b56 100644 --- a/xlators/cluster/stripe/src/stripe.c +++ b/xlators/cluster/stripe/src/stripe.c @@ -5440,12 +5440,18 @@ stripe_vgetxattr_cbk (call_frame_t *frame, void *cookie,                  }          unwind: -                STRIPE_STACK_UNWIND (getxattr, frame, op_ret, op_errno, -                                     stripe_xattr, NULL); - +                /* +                 * Among other things, STRIPE_STACK_UNWIND will free "local" +                 * for us.  That means we can't dereference it afterward. +                 * Fortunately, the actual result is in stripe_xattr now, so we +                 * can simply clean up before unwinding. +                 */                  ret = stripe_free_xattr_str (local); -                  GF_FREE (local->xattr_list); +                local->xattr_list = NULL; + +                STRIPE_STACK_UNWIND (getxattr, frame, op_ret, op_errno, +                                     stripe_xattr, NULL);                  if (stripe_xattr)                          dict_unref (stripe_xattr);  | 
