summaryrefslogtreecommitdiffstats
path: root/nsswitch/wbinfo.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-03-03 22:29:39 +0100
committerVolker Lendecke <vl@samba.org>2011-03-05 14:29:32 +0100
commit181b23ceed77de50c2b9d05a92a795cce1beabb9 (patch)
tree0e3004095836821089a90c18251027f9450c1797 /nsswitch/wbinfo.c
parentdcbfb6fc0b9050168e2010673caccb7ec8807bd1 (diff)
downloadsamba-181b23ceed77de50c2b9d05a92a795cce1beabb9.tar.gz
samba-181b23ceed77de50c2b9d05a92a795cce1beabb9.tar.xz
samba-181b23ceed77de50c2b9d05a92a795cce1beabb9.zip
nsswitch: wbcFreeMemory deals fine with NULL
Diffstat (limited to 'nsswitch/wbinfo.c')
-rw-r--r--nsswitch/wbinfo.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index caa37f3c9ed..150193d33c5 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -463,12 +463,8 @@ static bool wbinfo_get_sidaliases(const char *domain,
wbcFreeMemory(alias_rids);
done:
- if (domain_sid_str) {
- wbcFreeMemory(domain_sid_str);
- }
- if (dinfo) {
- wbcFreeMemory(dinfo);
- }
+ wbcFreeMemory(domain_sid_str);
+ wbcFreeMemory(dinfo);
return (WBC_ERR_SUCCESS == wbc_status);
}
@@ -1296,18 +1292,10 @@ static bool wbinfo_lookuprids(const char *domain, const char *arg)
ret = true;
done:
- if (dinfo) {
- wbcFreeMemory(dinfo);
- }
- if (domain_name) {
- wbcFreeMemory(domain_name);
- }
- if (names) {
- wbcFreeMemory(names);
- }
- if (types) {
- wbcFreeMemory(types);
- }
+ wbcFreeMemory(dinfo);
+ wbcFreeMemory(domain_name);
+ wbcFreeMemory(names);
+ wbcFreeMemory(types);
TALLOC_FREE(mem_ctx);
return ret;
}