* 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:
parent
6223c40c2d
commit
019048c555
@ -1,3 +1,8 @@
|
|||||||
|
2011-07-30 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* libmisc/find_new_uid.c: free (used_uids) on return.
|
||||||
|
* libmisc/find_new_gid.c: free (used_gids) on return.
|
||||||
|
|
||||||
2011-07-28 Nicolas François <nicolas.francois@centraliens.net>
|
2011-07-28 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* lib/commonio.c: Fix NIS commit from 2011-07-14.
|
* lib/commonio.c: Fix NIS commit from 2011-07-14.
|
||||||
|
@ -96,6 +96,7 @@ int find_new_gid (bool sys_group,
|
|||||||
* changes */
|
* changes */
|
||||||
&& (gr_locate_gid (*preferred_gid) == NULL)) {
|
&& (gr_locate_gid (*preferred_gid) == NULL)) {
|
||||||
*gid = *preferred_gid;
|
*gid = *preferred_gid;
|
||||||
|
free (used_gids);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,6 +180,7 @@ int find_new_gid (bool sys_group,
|
|||||||
Prog);
|
Prog);
|
||||||
SYSLOG ((LOG_WARN,
|
SYSLOG ((LOG_WARN,
|
||||||
"no more available GID on the system"));
|
"no more available GID on the system"));
|
||||||
|
free (used_gids);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -194,6 +196,7 @@ int find_new_gid (bool sys_group,
|
|||||||
_("%s: Can't get unique GID (no more available GIDs)\n"),
|
_("%s: Can't get unique GID (no more available GIDs)\n"),
|
||||||
Prog);
|
Prog);
|
||||||
SYSLOG ((LOG_WARN, "no more available GID on the system"));
|
SYSLOG ((LOG_WARN, "no more available GID on the system"));
|
||||||
|
free (used_gids);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,7 @@ int find_new_uid (bool sys_user,
|
|||||||
* changes */
|
* changes */
|
||||||
&& (pw_locate_uid (*preferred_uid) == NULL)) {
|
&& (pw_locate_uid (*preferred_uid) == NULL)) {
|
||||||
*uid = *preferred_uid;
|
*uid = *preferred_uid;
|
||||||
|
free (used_uids);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -179,6 +180,7 @@ int find_new_uid (bool sys_user,
|
|||||||
Prog);
|
Prog);
|
||||||
SYSLOG ((LOG_WARN,
|
SYSLOG ((LOG_WARN,
|
||||||
"no more available UID on the system"));
|
"no more available UID on the system"));
|
||||||
|
free (used_uids);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -194,6 +196,7 @@ int find_new_uid (bool sys_user,
|
|||||||
_("%s: Can't get unique UID (no more available UIDs)\n"),
|
_("%s: Can't get unique UID (no more available UIDs)\n"),
|
||||||
Prog);
|
Prog);
|
||||||
SYSLOG ((LOG_WARN, "no more available UID on the system"));
|
SYSLOG ((LOG_WARN, "no more available UID on the system"));
|
||||||
|
free (used_uids);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user