[glib] If dup fails don't call close()



commit b6a829c314a837824c63afec35bcf56742c4b71d
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jun 14 16:32:55 2011 -0400

    If dup fails don't call close()

 gio/gunixfdlist.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
---
diff --git a/gio/gunixfdlist.c b/gio/gunixfdlist.c
index b92238f..9a888b2 100644
--- a/gio/gunixfdlist.c
+++ b/gio/gunixfdlist.c
@@ -113,7 +113,6 @@ dup_close_on_exec_fd (gint     fd,
       g_set_error (error, G_IO_ERROR,
                    g_io_error_from_errno (saved_errno),
                    "dup: %s", g_strerror (saved_errno));
-      close (new_fd);
 
       return -1;
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]