socket-util: fix getpeergroups() assert(fd) (#8080)

Don't assert on zero-value fds.

Fixes #8075.
This commit is contained in:
Vito Caputo 2018-02-03 03:09:08 -08:00 committed by Yu Watanabe
parent 4a7e5fce6a
commit 75f4077960
1 changed files with 1 additions and 1 deletions

View File

@ -1008,7 +1008,7 @@ int getpeergroups(int fd, gid_t **ret) {
socklen_t n = sizeof(gid_t) * 64;
_cleanup_free_ gid_t *d = NULL;
assert(fd);
assert(fd >= 0);
assert(ret);
for (;;) {