Don't call close on invalid fds
authorMatthias Clasen <mclasen@redhat.com>
Mon, 29 Aug 2011 19:18:29 +0000 (15:18 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 29 Aug 2011 19:21:15 +0000 (15:21 -0400)
commitdc38967fd35286f9489a8cdcb3d811d34113ceca
tree517a4acdf18229a75615ff71871691d3eb4274ab
parentfb94a0299bbe23e8531556002cb7e2f895d736e0
Don't call close on invalid fds

If an fd is -1, don't call close() on it, since that leads to
EBDAF and complaints from valgrind.

https://bugzilla.gnome.org/show_bug.cgi?id=657593
glib/gtestutils.c