summaryrefslogtreecommitdiffstats
path: root/nsswitch
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-02-20 09:43:44 +0100
committerAlexander Bokovoy <ab@samba.org>2013-02-22 16:36:13 +0100
commit301a3cb4afadab6232a34086339696abd0dcbe0c (patch)
tree093c4ece3551e6dc7db719ed550f4aaa048f96c2 /nsswitch
parentd555f6d789ede9879f2b5d07d5c00199622ffe5a (diff)
downloadsamba-301a3cb4afadab6232a34086339696abd0dcbe0c.tar.gz
samba-301a3cb4afadab6232a34086339696abd0dcbe0c.tar.xz
samba-301a3cb4afadab6232a34086339696abd0dcbe0c.zip
wbinfo: Fix several memory leaks.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/wbinfo.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index b96b73c2bf..cd6de34fd5 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -243,6 +243,8 @@ static bool wbinfo_get_user_sidinfo(const char *sid_str)
pwd->pw_dir,
pwd->pw_shell);
+ wbcFreeMemory(pwd);
+
return true;
}
@@ -1227,6 +1229,9 @@ static bool wbinfo_lookupsid(const char *sid_str)
d_printf("%s%c%s %d\n",
domain, winbind_separator(), name, type);
+ wbcFreeMemory(domain);
+ wbcFreeMemory(name);
+
return true;
}
@@ -1261,6 +1266,9 @@ static bool wbinfo_lookupsid_fullname(const char *sid_str)
d_printf("%s%c%s %d\n",
domain, winbind_separator(), name, type);
+ wbcFreeMemory(domain);
+ wbcFreeMemory(name);
+
return true;
}