summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nsswitch/libwbclient/wbc_pwd.c5
-rw-r--r--nsswitch/libwbclient/wbc_sid.c19
2 files changed, 6 insertions, 18 deletions
diff --git a/nsswitch/libwbclient/wbc_pwd.c b/nsswitch/libwbclient/wbc_pwd.c
index bae6bf91ea..9b8df4d907 100644
--- a/nsswitch/libwbclient/wbc_pwd.c
+++ b/nsswitch/libwbclient/wbc_pwd.c
@@ -224,10 +224,7 @@ wbcErr wbcGetpwsid(struct wbcDomainSid *sid, struct passwd **pwd)
BAIL_ON_PTR_ERROR(*pwd, wbc_status);
done:
- if (sid_string) {
- wbcFreeMemory(sid_string);
- }
-
+ wbcFreeMemory(sid_string);
return wbc_status;
}
diff --git a/nsswitch/libwbclient/wbc_sid.c b/nsswitch/libwbclient/wbc_sid.c
index a0b8d0f6a9..e58912214e 100644
--- a/nsswitch/libwbclient/wbc_sid.c
+++ b/nsswitch/libwbclient/wbc_sid.c
@@ -553,10 +553,8 @@ wbcErr wbcGetSidAliases(const struct wbcDomainSid *dom_sid,
/* Build the sid list */
for (i=0; i<num_sids; i++) {
- if (sid_string) {
- wbcFreeMemory(sid_string);
- sid_string = NULL;
- }
+ wbcFreeMemory(sid_string);
+ sid_string = NULL;
wbc_status = wbcSidToString(&sids[i], &sid_string);
BAIL_ON_WBC_ERROR(wbc_status);
@@ -616,17 +614,10 @@ wbcErr wbcGetSidAliases(const struct wbcDomainSid *dom_sid,
wbc_status = WBC_ERR_SUCCESS;
done:
- if (sid_string) {
- wbcFreeMemory(sid_string);
- }
- if (extra_data) {
- talloc_free(extra_data);
- }
+ wbcFreeMemory(sid_string);
+ talloc_free(extra_data);
winbindd_free_response(&response);
- if (rids) {
- talloc_free(rids);
- }
-
+ talloc_free(rids);
return wbc_status;
}