r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
[jra/samba/.git] / source3 / libads / smb_krb5_locator.c
index 9861511714b79ddbfc20e781939de802fa8361f7..b5a6ffd4533b3cade3ce2256656372ced2b300d3 100644 (file)
@@ -5,7 +5,7 @@
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "includes.h"
@@ -239,7 +238,7 @@ void smb_krb5_locator_close(void *private_data)
 {
        DEBUG(10,("smb_krb5_locator_close: called\n"));
 
-       gfree_all();
+       /* gfree_all(); */
 }
 
 /**
@@ -324,7 +323,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 +364,8 @@ krb5_error_code smb_krb5_locator_lookup(void *private_data,
                }
        }
 
+       SAFE_FREE(ip_list);
+
        return ret;
 }