projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e5c986c
)
glib-unix.c: Don't leak FDs if pipe2() succeeds
author
Colin Walters
<walters@verbum.org>
Tue, 3 May 2011 20:22:13 +0000
(16:22 -0400)
committer
Colin Walters
<walters@verbum.org>
Tue, 3 May 2011 20:22:13 +0000
(16:22 -0400)
glib/glib-unix.c
patch
|
blob
|
history
diff --git
a/glib/glib-unix.c
b/glib/glib-unix.c
index 5a0f7f777f3b95a16762e8527de2e0a04855a01c..d88455ae7d28e139531a16d55c03aa2615c20bfe 100644
(file)
--- a/
glib/glib-unix.c
+++ b/
glib/glib-unix.c
@@
-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