Inform the user if out of memory while updating a group database.

This commit is contained in:
nekral-guest
2007-11-16 23:39:42 +00:00
parent 7ecdf9b71f
commit 9afe59af3e
4 changed files with 19 additions and 3 deletions

View File

@ -727,6 +727,9 @@ static void grp_update (void)
*/
ngrp = __gr_dup (grp);
if (!ngrp) {
fprintf (stderr,
_("%s: Out of memory. Cannot update the group database.\n"),
Prog);
fail_exit (E_GRP_UPDATE); /* XXX */
}
@ -775,6 +778,9 @@ static void grp_update (void)
*/
nsgrp = __sgr_dup (sgrp);
if (!nsgrp) {
fprintf (stderr,
_("%s: Out of memory. Cannot update the shadow group database.\n"),
Prog);
fail_exit (E_GRP_UPDATE); /* XXX */
}