summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHumble Devassy Chirammal <hchiramm@redhat.com>2015-03-30 18:59:52 +0530
committerNiels de Vos <ndevos@redhat.com>2015-04-01 03:55:40 -0700
commit07bd6c320c75c39b599929039d028fbc497d4322 (patch)
tree866dbd77b283cb82664208255caff88587d53da0
parent6d083f47e1399c58da02836f33fdb7d9c31fd689 (diff)
libgfapi : return if gf_strdup failed
Change-Id: Ic8ad48b8118a8505ebbab2e9084007acca7226e9 BUG: 1198963 Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com> Reviewed-on: http://review.gluster.org/9807 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
-rw-r--r--api/src/glfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/src/glfs.c b/api/src/glfs.c
index 4ae4d769471..efc9e1f3635 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -733,7 +733,8 @@ pub_glfs_set_volfile (struct glfs *fs, const char *volfile)
return -1;
cmd_args->volfile = gf_strdup (volfile);
-
+ if (!cmd_args->volfile)
+ return -1;
return 0;
}