summaryrefslogtreecommitdiff
path: root/nsswitch/libwbclient/wbc_sid.c
diff options
context:
space:
mode:
Diffstat (limited to 'nsswitch/libwbclient/wbc_sid.c')
-rw-r--r--nsswitch/libwbclient/wbc_sid.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nsswitch/libwbclient/wbc_sid.c b/nsswitch/libwbclient/wbc_sid.c
index b1ecba3f6d..99c9d8e152 100644
--- a/nsswitch/libwbclient/wbc_sid.c
+++ b/nsswitch/libwbclient/wbc_sid.c
@@ -248,9 +248,13 @@ wbcErr wbcLookupSid(const struct wbcDomainSid *sid,
if (WBC_ERROR_IS_OK(wbc_status)) {
if (pdomain != NULL) {
*pdomain = domain;
+ } else {
+ TALLOC_FREE(domain);
}
if (pname != NULL) {
*pname = name;
+ } else {
+ TALLOC_FREE(name);
}
if (pname_type != NULL) {
*pname_type = name_type;