mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 16:50:17 +01: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue