summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server.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/protocol/server/src/server.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/protocol/server/src/server.c')
-rw-r--r--xlators/protocol/server/src/server.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index b7612e012..74dbc17e6 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -619,8 +619,7 @@ validate_auth_options (xlator_t *this, dict_t *dict)
}
out:
- if (tmp_addr_list)
- GF_FREE (tmp_addr_list);
+ GF_FREE (tmp_addr_list);
return error;
}
@@ -865,8 +864,7 @@ reconfigure (xlator_t *this, dict_t *options)
/*ret = dict_get_str (options, "statedump-path", &statedump_path);
if (!ret) {
gf_path_strip_trailing_slashes (statedump_path);
- if (this->ctx->statedump_path)
- GF_FREE (this->ctx->statedump_path);
+ GF_FREE (this->ctx->statedump_path);
this->ctx->statedump_path = gf_strdup (statedump_path);
}*/
GF_OPTION_RECONF ("statedump-path", statedump_path,
@@ -878,8 +876,7 @@ reconfigure (xlator_t *this, dict_t *options)
goto out;
}
gf_path_strip_trailing_slashes (statedump_path);
- if (this->ctx->statedump_path)
- GF_FREE (this->ctx->statedump_path);
+ GF_FREE (this->ctx->statedump_path);
this->ctx->statedump_path = gf_strdup (statedump_path);
if (!conf->auth_modules)