diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handshake.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handshake.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c index 95fe96e04a4..1ea1fcef02e 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handshake.c +++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c @@ -47,11 +47,13 @@ build_volfile_path (const char *volname, char *path, glusterd_conf_t *priv = NULL; char *vol = NULL; char *dup_volname = NULL; + char *free_ptr = NULL; char *tmp = NULL; glusterd_volinfo_t *volinfo = NULL; priv = THIS->private; dup_volname = gf_strdup (volname); + free_ptr = dup_volname; ret = glusterd_volinfo_find (dup_volname, &volinfo); if (ret) { @@ -81,9 +83,8 @@ build_volfile_path (const char *volname, char *path, ret = 1; out: - if (dup_volname) - GF_FREE (dup_volname); - + if (free_ptr) + GF_FREE (free_ptr); return ret; } |