summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-08-01 15:17:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:28 -0500
commit41449a85e64325d16c63ea4e6ee57254c8aac996 (patch)
treeed1d0f0c28d4329bdd353ceb0092986f26ff8d26
parent8eebd925b26c4592eba1773a94379f891ead6144 (diff)
downloadsamba-41449a85e64325d16c63ea4e6ee57254c8aac996.tar.gz
samba-41449a85e64325d16c63ea4e6ee57254c8aac996.tar.bz2
samba-41449a85e64325d16c63ea4e6ee57254c8aac996.zip
r17365: Fix memleak.
Guenther (This used to be commit 62a8e0b08919e71c6a575ce6d89d8a4a09acbd87)
-rw-r--r--source3/nsswitch/pam_winbind.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/nsswitch/pam_winbind.c b/source3/nsswitch/pam_winbind.c
index 393dc29245..f96dd0ee9b 100644
--- a/source3/nsswitch/pam_winbind.c
+++ b/source3/nsswitch/pam_winbind.c
@@ -227,12 +227,15 @@ static int _make_remark_format(pam_handle_t * pamh, int type, const char *format
{
va_list args;
char *var;
+ int ret;
va_start(args, format);
vasprintf(&var, format, args);
va_end(args);
- return _make_remark(pamh, type, var);
+ ret = _make_remark(pamh, type, var);
+ SAFE_FREE(var);
+ return ret;
}
static int pam_winbind_request(pam_handle_t * pamh, int ctrl,