From: Günther Deschner Date: Fri, 16 Mar 2007 15:48:07 +0000 (+0000) Subject: r21855: Fix a memleak in the krb5 locator and comment out gfree_all() which doesn't X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~935 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=128ea9bebbb215e41d2f0576e1a73c6a362b7467;p=thirdparty%2Fsamba.git 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 --- diff --git a/source/libads/smb_krb5_locator.c b/source/libads/smb_krb5_locator.c index 9861511714b..be14a126974 100644 --- a/source/libads/smb_krb5_locator.c +++ b/source/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; }