From fe390747e46cb3d19bb5ac2980f82e45acb7fcf0 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Fri, 28 Dec 2012 20:30:04 +0000 Subject: [PATCH] errno = ENOMEM was supposed to be removed not return (NULL); Submitted by: gcooper --- lib/libutil/gr_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libutil/gr_util.c b/lib/libutil/gr_util.c index 66767201f69..5f803af6f6b 100644 --- a/lib/libutil/gr_util.c +++ b/lib/libutil/gr_util.c @@ -506,7 +506,7 @@ gr_add(struct group *gr, char *newmember) /* Allocate enough for current pointers + 1 more and NULL marker */ mlen = (num_mem + 2) * sizeof(*gr->gr_mem); if ((members = malloc(mlen)) == NULL) - errno = ENOMEM; + return (NULL); memcpy(members, gr->gr_mem, num_mem * sizeof(*gr->gr_mem)); members[num_mem++] = newmember; members[num_mem] = NULL;