* libmisc/find_new_uid.c: free (used_uids) on return.
* libmisc/find_new_gid.c: free (used_gids) on return.
This commit is contained in:
		@@ -96,6 +96,7 @@ int find_new_gid (bool sys_group,
 | 
			
		||||
	     * changes */
 | 
			
		||||
	    && (gr_locate_gid (*preferred_gid) == NULL)) {
 | 
			
		||||
		*gid = *preferred_gid;
 | 
			
		||||
		free (used_gids);
 | 
			
		||||
		return 0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -179,6 +180,7 @@ int find_new_gid (bool sys_group,
 | 
			
		||||
				         Prog);
 | 
			
		||||
				SYSLOG ((LOG_WARN,
 | 
			
		||||
				         "no more available GID on the system"));
 | 
			
		||||
				free (used_gids);
 | 
			
		||||
				return -1;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
@@ -194,6 +196,7 @@ int find_new_gid (bool sys_group,
 | 
			
		||||
				         _("%s: Can't get unique GID (no more available GIDs)\n"),
 | 
			
		||||
				         Prog);
 | 
			
		||||
				SYSLOG ((LOG_WARN, "no more available GID on the system"));
 | 
			
		||||
				free (used_gids);
 | 
			
		||||
				return -1;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
@@ -96,6 +96,7 @@ int find_new_uid (bool sys_user,
 | 
			
		||||
	     * changes */
 | 
			
		||||
	    && (pw_locate_uid (*preferred_uid) == NULL)) {
 | 
			
		||||
		*uid = *preferred_uid;
 | 
			
		||||
		free (used_uids);
 | 
			
		||||
		return 0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@@ -179,6 +180,7 @@ int find_new_uid (bool sys_user,
 | 
			
		||||
				         Prog);
 | 
			
		||||
				SYSLOG ((LOG_WARN,
 | 
			
		||||
				         "no more available UID on the system"));
 | 
			
		||||
				free (used_uids);
 | 
			
		||||
				return -1;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
@@ -194,6 +196,7 @@ int find_new_uid (bool sys_user,
 | 
			
		||||
				         _("%s: Can't get unique UID (no more available UIDs)\n"),
 | 
			
		||||
				         Prog);
 | 
			
		||||
				SYSLOG ((LOG_WARN, "no more available UID on the system"));
 | 
			
		||||
				free (used_uids);
 | 
			
		||||
				return -1;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user