Removed version number from file header.
[samba.git] / source / groupdb / aliasfile.c
index 2735fef38f21b52757822534914c22b106f0d091..77189fd8227db965d00dbd33c84e167e5251748e 100644 (file)
@@ -1,5 +1,6 @@
 /*
- * Unix SMB/Netbios implementation. Version 1.9. SMB parameters and setup
+ * Unix SMB/CIFS implementation.
+ * SMB parameters and setup
  * Copyright (C) Andrew Tridgell 1992-1998 Modified by Jeremy Allison 1995.
  * 
  * This program is free software; you can redistribute it and/or modify it under
@@ -22,7 +23,6 @@
 #ifdef USE_SMBPASS_DB
 
 static int al_file_lock_depth = 0;
-extern int DEBUGLEVEL;
 
 static char s_readbuf[1024];
 
@@ -119,34 +119,28 @@ static char *get_alias_members(char *p, int *num_mem, LOCAL_GRP_MEMBER **members
        fstring name;
 
        if (num_mem == NULL || members == NULL)
-       {
                return NULL;
-       }
 
        (*num_mem) = 0;
        (*members) = NULL;
 
-       while (next_token(&p, name, ",", sizeof(fstring)))
-       {
+       while (next_token(&p, name, ",", sizeof(fstring))) {
                LOCAL_GRP_MEMBER *mbrs;
                DOM_SID sid;
                uint8 type;
 
-               if (lookup_sid(name, &sid, &type))
-               {
+               if (lookup_sid(name, &sid, &type)) {
                        mbrs = Realloc((*members), ((*num_mem)+1) * sizeof(LOCAL_GRP_MEMBER));
                        (*num_mem)++;
-               }
-               else
-               {
+               } else {
                        DEBUG(0,("alias database: could not resolve alias named %s\n", name));
                        continue;
                }
-               if (mbrs == NULL)
-               {
+               if (mbrs == NULL) {
+                       SAFE_FREE(*members);
                        return NULL;
-               }
-               else (*members) = mbrs;
+        } else
+            (*members) = mbrs;
                
                fstrcpy((*members)[(*num_mem)-1].name, name);
                (*members)[(*num_mem)-1].sid_use = type;