summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/src/glfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/api/src/glfs.c b/api/src/glfs.c
index 1bae78d23..2b4312eac 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -68,6 +68,10 @@ glusterfs_ctx_defaults_init (glusterfs_ctx_t *ctx)
xlator_mem_acct_init (THIS, glfs_mt_end + 1);
+ if (!ctx) {
+ goto err;
+ }
+
ctx->process_uuid = generate_glusterfs_ctx_id ();
if (!ctx->process_uuid) {
goto err;