summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/stack.h
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/stack.h')
-rw-r--r--libglusterfs/src/stack.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/libglusterfs/src/stack.h b/libglusterfs/src/stack.h
index ac69e389f22..1ce46ccdc89 100644
--- a/libglusterfs/src/stack.h
+++ b/libglusterfs/src/stack.h
@@ -253,7 +253,10 @@ STACK_DESTROY (call_stack_t *stack)
ret_fn_t fn = NULL; \
call_frame_t *_parent = NULL; \
xlator_t *old_THIS = NULL; \
- \
+ if (!frame) { \
+ gf_log ("stack", GF_LOG_CRITICAL, "!frame"); \
+ break; \
+ } \
fn = frame->ret; \
_parent = frame->parent; \
_parent->ref_count--; \
@@ -277,6 +280,10 @@ STACK_DESTROY (call_stack_t *stack)
call_frame_t *_parent = NULL; \
xlator_t *old_THIS = NULL; \
\
+ if (!frame) { \
+ gf_log ("stack", GF_LOG_CRITICAL, "!frame"); \
+ break; \
+ } \
fn = (fop_##op##_cbk_t )frame->ret; \
_parent = frame->parent; \
_parent->ref_count--; \