From 4eac667d30bce0768bc7e220614f703d45ee6f81 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Mon, 15 Jun 2009 04:12:21 +0000 Subject: write-behind: check for memory allocation failures and take appropriate action Signed-off-by: Anand V. Avati --- libglusterfs/src/stack.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libglusterfs/src/stack.h') diff --git a/libglusterfs/src/stack.h b/libglusterfs/src/stack.h index 15b24ea08..e7c1cbd15 100644 --- a/libglusterfs/src/stack.h +++ b/libglusterfs/src/stack.h @@ -224,6 +224,10 @@ copy_frame (call_frame_t *frame) } newstack = (void *) CALLOC (1, sizeof (*newstack)); + if (newstack == NULL) { + return NULL; + } + oldstack = frame->root; newstack->uid = oldstack->uid; -- cgit