summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/stack.h
diff options
context:
space:
mode:
authorAmar Tumballi <amar@80x25.org>2008-03-24 07:06:04 +0000
committerAmar Tumballi <amarts@redhat.com>2017-05-05 01:31:39 +0530
commit940eefb5d398637b9487bded76f8d68dfdbe82df (patch)
tree36722447a261f99b80ffc08e9f99a5c36b263cfa /libglusterfs/src/stack.h
parent5860e10755772bc0e6bbcacce2585962bfb9f42c (diff)
* 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.
Diffstat (limited to 'libglusterfs/src/stack.h')
-rw-r--r--libglusterfs/src/stack.h6
1 files changed, 6 insertions, 0 deletions
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;