diff options
author | Volker Lendecke <vl@samba.org> | 2010-04-04 22:49:38 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-04-04 23:22:52 +0200 |
commit | 488fe76a22b4550110d41068d721c30b337825b5 (patch) | |
tree | 88ec48703b00efcbbdac64da0b51e4b2fdaf96b5 | |
parent | 50a625ce0edc13312030d24df4b0b7eeaa50bfb0 (diff) | |
download | samba-488fe76a22b4550110d41068d721c30b337825b5.tar.gz samba-488fe76a22b4550110d41068d721c30b337825b5.tar.bz2 samba-488fe76a22b4550110d41068d721c30b337825b5.zip |
libwbclient: Fix a memleak in wbcListTrusts
-rw-r--r-- | nsswitch/libwbclient/wbc_util.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/nsswitch/libwbclient/wbc_util.c b/nsswitch/libwbclient/wbc_util.c index 2c2ae55d4c..5637b2ec44 100644 --- a/nsswitch/libwbclient/wbc_util.c +++ b/nsswitch/libwbclient/wbc_util.c @@ -467,18 +467,13 @@ wbcErr wbcListTrusts(struct wbcDomainInfo **domains, size_t *num_domains) } *domains = d_list; + d_list = NULL; *num_domains = i; done: winbindd_free_response(&response); - - if (!WBC_ERROR_IS_OK(wbc_status)) { - if (d_list) - talloc_free(d_list); - if (extra_data) - free(extra_data); - } - + talloc_free(d_list); + free(extra_data); return wbc_status; } |