summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-store.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-07-13 10:29:48 +0200
committerAnand Avati <avati@redhat.com>2012-07-13 14:03:42 -0700
commit7820b2c1f88b207a8b1270b8c3cb3b797b7563d2 (patch)
tree5a383d85eb18399cf7506a90cc7627c749ccf9b8 /xlators/mgmt/glusterd/src/glusterd-store.c
parent2dc0d32e5d8b205fa407073b209bb663d546dde8 (diff)
remove useless if-before-free (and free-like) functions
See comments in http://bugzilla.redhat.com/839925 for the code to perform this change. Signed-off-by: Jim Meyering <meyering@redhat.com> BUG: 839925 Change-Id: I10e4ecff16c3749fe17c2831c516737e08a3205a Reviewed-on: http://review.gluster.com/3661 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index a70256c398f..6d707878a18 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -1222,8 +1222,7 @@ out:
handle->read = NULL;
}
- if (free_str)
- GF_FREE (free_str);
+ GF_FREE (free_str);
return ret;
}
@@ -1304,11 +1303,8 @@ out:
close (fd);
if (ret == -1) {
- if (spath)
- GF_FREE (spath);
- if (shandle) {
- GF_FREE (shandle);
- }
+ GF_FREE (spath);
+ GF_FREE (shandle);
}
gf_log ("", GF_LOG_DEBUG, "Returning %d", ret);
@@ -1454,8 +1450,7 @@ glusterd_retrieve_uuid ()
uuid_parse (uuid_str, priv->uuid);
out:
- if (uuid_str)
- GF_FREE (uuid_str);
+ GF_FREE (uuid_str);
gf_log ("", GF_LOG_DEBUG, "Returning %d", ret);
return ret;
}
@@ -1616,8 +1611,7 @@ out:
*value = NULL;
}
}
- if (free_str)
- GF_FREE (free_str);
+ GF_FREE (free_str);
if (op_errno)
*op_errno = store_errno;