mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-20 14:19:16 +02:00
glib-unix.c: Don't leak FDs if pipe2() succeeds
This commit is contained in:
parent
e5c986cbcf
commit
511070fb28
@ -111,6 +111,8 @@ g_unix_pipe_flags (int *fds,
|
|||||||
ecode = pipe2 (fds, pipe2_flags);
|
ecode = pipe2 (fds, pipe2_flags);
|
||||||
if (ecode == -1 && errno != ENOSYS)
|
if (ecode == -1 && errno != ENOSYS)
|
||||||
return g_unix_set_error_from_errno (error);
|
return g_unix_set_error_from_errno (error);
|
||||||
|
else if (ecode == 0)
|
||||||
|
return TRUE;
|
||||||
/* Fall through on -ENOSYS, we must be running on an old kernel */
|
/* Fall through on -ENOSYS, we must be running on an old kernel */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user