mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-06 17:14:02 +00:00
shared: fix nm_steal_fd() for handling zero file descriptor
Zero is a valid file descriptor.
Fixes: 956b3e8bd5
This commit is contained in:
parent
31facf6fad
commit
de65d3da91
|
@ -1157,7 +1157,7 @@ nm_steal_fd (int *p_fd)
|
|||
int fd;
|
||||
|
||||
if ( p_fd
|
||||
&& ((fd = *p_fd) > 0)) {
|
||||
&& ((fd = *p_fd) >= 0)) {
|
||||
*p_fd = -1;
|
||||
return fd;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue