summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/syncop.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c
index 00a9b576269..7275f22b099 100644
--- a/libglusterfs/src/syncop.c
+++ b/libglusterfs/src/syncop.c
@@ -831,8 +831,10 @@ syncenv_new (size_t stacksize, int procmin, int procmax)
newenv->procs++;
}
- if (ret != 0)
+ if (ret != 0) {
syncenv_destroy (newenv);
+ newenv = NULL;
+ }
return newenv;
}