socket-util: fix getpeergroups() assert(fd) (#8080)
Don't assert on zero-value fds. Fixes #8075.
This commit is contained in:
parent
4a7e5fce6a
commit
75f4077960
|
@ -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 (;;) {
|
||||
|
|
Loading…
Reference in New Issue