From 301a3cb4afadab6232a34086339696abd0dcbe0c Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 20 Feb 2013 09:43:44 +0100 Subject: wbinfo: Fix several memory leaks. Reviewed-by: Alexander Bokovoy --- nsswitch/wbinfo.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'nsswitch') 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; } -- cgit