Skip to content

Commit 3771e2b

Browse files
authored
Merge pull request #50 from nirs/getgrnam
Fix incorrect getgrnam error handling
2 parents 26c56cb + 74644f8 commit 3771e2b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ static int socket_bindlisten(const char *socket_path,
348348
goto err;
349349
}
350350
if (socket_group != NULL) {
351+
errno = 0;
351352
struct group *grp = getgrnam(socket_group); /* Do not free */
352353
if (grp == NULL) {
353354
if (errno != 0)

0 commit comments

Comments
 (0)