summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/glusterfs
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2019-09-03 20:52:42 +0530
committerAmar Tumballi <amarts@gmail.com>2019-09-12 07:21:58 +0000
commitda76f7bbef4d311775a5f75c96a54785170a1727 (patch)
tree64e962c02103b45d58188bea8e8066ba8e900907 /libglusterfs/src/glusterfs
parent5091a482125eeac3b00915888cf3de775cd3cbbc (diff)
core/syncop: Bail out if frame creation fails
There could be cases (either due to insufficient memory or corrupted mem-pool) due to which frame creation fails. Bail out with error in such cases. Change-Id: I8cc0a5852f6f04d2bac991e4eb79ecb42577da11 Fixes: bz#1748448 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Diffstat (limited to 'libglusterfs/src/glusterfs')
-rw-r--r--libglusterfs/src/glusterfs/syncop.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs/syncop.h b/libglusterfs/src/glusterfs/syncop.h
index b00988eeef1..3614d969264 100644
--- a/libglusterfs/src/glusterfs/syncop.h
+++ b/libglusterfs/src/glusterfs/syncop.h
@@ -244,6 +244,12 @@ struct syncopctx {
else \
frame = syncop_create_frame(THIS); \
\
+ if (!frame) { \
+ stb->op_ret = -1; \
+ stb->op_errno = errno; \
+ break; \
+ } \
+ \
if (task) { \
frame->root->uid = task->uid; \
frame->root->gid = task->gid; \