diff options
author | bapt <bapt@FreeBSD.org> | 2012-12-28 20:30:04 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2012-12-28 20:30:04 +0000 |
commit | 3c6bd22efebf26dd6f310e2b25fbd4a1f544aee1 (patch) | |
tree | 764d8b7c4c9eb63b13848a76c7167e2d882a40a7 /lib/libutil | |
parent | 83035e89840797684386d0bd3a46f2c24030771b (diff) | |
download | FreeBSD-src-3c6bd22efebf26dd6f310e2b25fbd4a1f544aee1.zip FreeBSD-src-3c6bd22efebf26dd6f310e2b25fbd4a1f544aee1.tar.gz |
errno = ENOMEM was supposed to be removed not return (NULL);
Submitted by: gcooper
Diffstat (limited to 'lib/libutil')
-rw-r--r-- | lib/libutil/gr_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libutil/gr_util.c b/lib/libutil/gr_util.c index 6676720..5f803af 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; |