From 940eefb5d398637b9487bded76f8d68dfdbe82df Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Mon, 24 Mar 2008 07:06:04 +0000 Subject: * scheduler/alu.c: - Removed a exit(1), and made it return -1; * libglusterfs/*: xlators/protocol/*: xlators/storage/posix.c: - Added more argument checking and logging in case of failures. --- libglusterfs/src/stack.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libglusterfs/src/stack.h') diff --git a/libglusterfs/src/stack.h b/libglusterfs/src/stack.h index 9521c8dc30..60510886de 100644 --- a/libglusterfs/src/stack.h +++ b/libglusterfs/src/stack.h @@ -173,6 +173,9 @@ do { \ static inline call_frame_t * copy_frame (call_frame_t *frame) { + if (!frame) { + return NULL; + } call_ctx_t *newctx = (void *) calloc (1, sizeof (*newctx)); call_ctx_t *oldctx = frame->root; @@ -198,6 +201,9 @@ copy_frame (call_frame_t *frame) static inline call_frame_t * create_frame (xlator_t *xl, call_pool_t *pool) { + if (!xl || !pool) { + return NULL; + } call_ctx_t *cctx = calloc (1, sizeof (*cctx)); cctx->pool = pool; -- cgit