Removed version number from file header.
[samba.git] / source / groupdb / groupdb.c
index 4b7795c57ba6ef3fd01694eae7e9602e03690a75..c18463741d9230ccf331d0912a399ae89d9509df 100644 (file)
@@ -1,6 +1,5 @@
 /* 
-   Unix SMB/Netbios implementation.
-   Version 1.9.
+   Unix SMB/CIFS implementation.
    Password and authentication handling
    Copyright (C) Jeremy Allison 1996-1998
    Copyright (C) Luke Kenneth Casson Leighton 1996-1998
@@ -22,8 +21,6 @@
 
 #include "includes.h"
 
-extern int DEBUGLEVEL;
-
 /*
  * NOTE. All these functions are abstracted into a structure
  * that points to the correct function for the selected database. JRA.
@@ -141,16 +138,14 @@ BOOL add_domain_group(DOMAIN_GRP **grps, int *num_grps, DOMAIN_GRP *grp)
        DOMAIN_GRP *tgrps;
 
        if (grps == NULL || num_grps == NULL || grp == NULL)
-       {
                return False;
-       }
 
        tgrps = Realloc((*grps), ((*num_grps)+1) * sizeof(DOMAIN_GRP));
-       if (tgrps == NULL)
-       {
+       if (tgrps == NULL) {
+               SAFE_FREE(*grps);
                return False;
-       }
-       else (*grps) = tgrps;
+       } else
+               (*grps) = tgrps;
 
        DEBUG(10,("adding group %s(%s)\n", grp->name, grp->comment));
 
@@ -225,8 +220,7 @@ BOOL iterate_getusergroupsnam(char *user_name, DOMAIN_GRP **grps, int *num_grps)
                                ret = add_domain_group(grps, num_grps, grp);
                        }
 
-                       free(mem);
-                       mem = NULL;
+                       SAFE_FREE(mem);
                        num_mem = 0;
 
                        if (!ret)