summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@zresearch.com>2009-06-15 04:12:21 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-06-15 23:44:35 -0700
commit4eac667d30bce0768bc7e220614f703d45ee6f81 (patch)
treea261d9e371413eed36ee8674bb5d95496df8d817 /libglusterfs/src
parent8f29c29480ad4f716229d480ada7fc2b6711f22e (diff)
write-behind: check for memory allocation failures and take appropriate action
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/stack.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libglusterfs/src/stack.h b/libglusterfs/src/stack.h
index 15b24ea08d9..e7c1cbd152d 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;