Set num_validated_users to zero if Realloc fails.
[kai/samba.git] / source3 / smbd / password.c
index 4f9f91d76d06a4a4c15c123df1dfb38b5095cc2b..9b06e0dcb52a10e6b609a399bdc31dd9e23757ac 100644 (file)
@@ -152,6 +152,7 @@ uint16 register_vuid(int uid,int gid, char *name,BOOL guest)
   if (!validated_users)
     {
       DEBUG(0,("Failed to realloc users struct!\n"));
+      num_validated_users = 0;
       return UID_FIELD_INVALID;
     }