summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/stripe/src/stripe.h
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/stripe/src/stripe.h')
-rw-r--r--xlators/cluster/stripe/src/stripe.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/xlators/cluster/stripe/src/stripe.h b/xlators/cluster/stripe/src/stripe.h
index 3dbd93d59f6..6199c006100 100644
--- a/xlators/cluster/stripe/src/stripe.h
+++ b/xlators/cluster/stripe/src/stripe.h
@@ -44,15 +44,21 @@
frame->local = NULL; \
} \
STACK_UNWIND_STRICT (fop, frame, params); \
- stripe_local_wipe(__local); \
+ if (__local) { \
+ stripe_local_wipe(__local); \
+ GF_FREE (__local); \
+ } \
} while (0)
#define STRIPE_STACK_DESTROY(frame) do { \
stripe_local_t *__local = NULL; \
- __local = frame->local; \
- frame->local = NULL; \
- STACK_DESTROY (frame->root); \
- stripe_local_wipe (__local); \
+ __local = frame->local; \
+ frame->local = NULL; \
+ STACK_DESTROY (frame->root); \
+ if (__local) { \
+ stripe_local_wipe (__local); \
+ GF_FREE (__local); \
+ } \
} while (0)
/**