From d4ad11ccd8dd6780e048849784b33fd55d5a04b6 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 15 Jun 2006 21:59:25 +0000 Subject: r16272: Fix memleak. Guenther (This used to be commit afdb1189029e01a132f16fea48624126ec65cd77) --- source3/libads/kerberos.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/libads') diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c index 2dfdc31dd5..90650e1dce 100644 --- a/source3/libads/kerberos.c +++ b/source3/libads/kerberos.c @@ -195,6 +195,7 @@ int ads_kinit_password(ADS_STRUCT *ads) } if (!ads->auth.password) { + SAFE_FREE(s); return KRB5_LIBOS_CANTREADPWD; } @@ -205,7 +206,7 @@ int ads_kinit_password(ADS_STRUCT *ads) DEBUG(0,("kerberos_kinit_password %s failed: %s\n", s, error_message(ret))); } - free(s); + SAFE_FREE(s); return ret; } -- cgit