mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 03:46:17 +01: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);
|
||||
if (ecode == -1 && errno != ENOSYS)
|
||||
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 */
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user