From b067d986b4f45996a3920c2412210a397871af06 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 16 Mar 2007 15:48:07 +0000 Subject: r21855: Fix a memleak in the krb5 locator and comment out gfree_all() which doesn't make sense as long as it doesn't work as an lp_unload(). Guenther (This used to be commit 128ea9bebbb215e41d2f0576e1a73c6a362b7467) --- source3/libads/smb_krb5_locator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source3/libads/smb_krb5_locator.c b/source3/libads/smb_krb5_locator.c index 9861511714..be14a12697 100644 --- a/source3/libads/smb_krb5_locator.c +++ b/source3/libads/smb_krb5_locator.c @@ -239,7 +239,7 @@ void smb_krb5_locator_close(void *private_data) { DEBUG(10,("smb_krb5_locator_close: called\n")); - gfree_all(); + /* gfree_all(); */ } /** @@ -324,7 +324,7 @@ krb5_error_code smb_krb5_locator_lookup(void *private_data, /* if we didn't found any KDCs on our site go to the main list */ if (NT_STATUS_IS_OK(status) && sitename && (count == 0)) { - ip_list = NULL; + SAFE_FREE(ip_list); SAFE_FREE(sitename); status = get_kdc_list(realm, NULL, &ip_list, &count); } @@ -365,6 +365,8 @@ krb5_error_code smb_krb5_locator_lookup(void *private_data, } } + SAFE_FREE(ip_list); + return ret; } -- cgit