summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-mgmt.c
diff options
context:
space:
mode:
authorSakshi Bansal <sabansal@redhat.com>2015-02-09 15:41:37 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2015-02-09 06:51:55 -0800
commit1353aeadcd080c356a4c404dbfb10ff3f23ab4cf (patch)
tree08ce700abf3dcffe1e170042327597db48c598b4 /api/src/glfs-mgmt.c
parentefd93f0b2b42f8a8b151bf694fdd340fbcb22ec0 (diff)
api: coverity fix.
CID 1214617: dereference NULL return value. Change-Id: I57447c3b1663edadfa966892c53bc2a16d4a166f BUG: 789278 Signed-off-by: Sakshi Bansal <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/9610 Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'api/src/glfs-mgmt.c')
-rw-r--r--api/src/glfs-mgmt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c
index 86a186e581b..94e660795db 100644
--- a/api/src/glfs-mgmt.c
+++ b/api/src/glfs-mgmt.c
@@ -377,6 +377,12 @@ glfs_get_volume_info (struct glfs *fs)
ctx = fs->ctx;
frame = create_frame (THIS, ctx->pool);
+ if (!frame) {
+ gf_log ("glfs", GF_LOG_ERROR, "failed to create the frame");
+ ret = -1;
+ goto out;
+ }
+
frame->local = &args;
__yawn ((&args));