GUnix{Input,Output}Stream: Only release cancelable poll-fd if we allocated it
authorDavid Zeuthen <davidz@redhat.com>
Mon, 5 Mar 2012 17:57:32 +0000 (12:57 -0500)
committerDavid Zeuthen <davidz@redhat.com>
Mon, 5 Mar 2012 18:00:28 +0000 (13:00 -0500)
commit6e8caec6d9af06d4f7f0e6cd1a86c6c47e49ff01
tree6831008950cad50600bd08b4e48117e82e1c697f
parentb6f65ec94065eb1ef321fe034b6fe94059bb741e
GUnix{Input,Output}Stream: Only release cancelable poll-fd if we allocated it

Otherwise we get criticals a'la

 GLib-GIO-CRITICAL **: g_cancellable_release_fd: assertion `cancellable->priv->fd_refcount > 0' failed

when reading/writing to certain kinds of file descriptors.

Patch reviewed by Dan Winship on IRC.

Signed-off-by: David Zeuthen <davidz@redhat.com>
gio/gunixinputstream.c
gio/gunixoutputstream.c