summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-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;
}