mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 00:12:19 +01:00 
			
		
		
		
	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>
This commit is contained in:
		| @@ -417,7 +417,8 @@ g_unix_input_stream_read (GInputStream  *stream, | ||||
|       break; | ||||
|     } | ||||
|  | ||||
|   g_cancellable_release_fd (cancellable); | ||||
|   if (nfds == 2) | ||||
|     g_cancellable_release_fd (cancellable); | ||||
|   return res; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -403,7 +403,8 @@ g_unix_output_stream_write (GOutputStream  *stream, | ||||
|       break; | ||||
|     } | ||||
|  | ||||
|   g_cancellable_release_fd (cancellable); | ||||
|   if (nfds == 2) | ||||
|     g_cancellable_release_fd (cancellable); | ||||
|   return res; | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user