<div dir="ltr">Hi<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 18, 2015 at 9:09 AM, Victor Toso <span dir="ltr"><<a href="mailto:victortoso@redhat.com" target="_blank">victortoso@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">PipeInputStream and PipeOutputStream should not fail when creating<br>
GPollableStream source. It is already checked and unref in case of<br>
existing source.<br></blockquote><div><br></div><div>The check is about making sure that either the source is NULL or it is destroyed.<br><br></div><div>As such it looks fine to me, or it might leak since the condition to unref might not be reached.<br><br>Do you have a test case for the issue you encoutered?<br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
 gtk/giopipe.c | 6 ------<br>
 1 file changed, 6 deletions(-)<br>
<br>
diff --git a/gtk/giopipe.c b/gtk/giopipe.c<br>
index 440cae9..32fa4fa 100644<br>
--- a/gtk/giopipe.c<br>
+++ b/gtk/giopipe.c<br>
@@ -234,9 +234,6 @@ pipe_input_stream_create_source (GPollableInputStream *stream,<br>
     PipeInputStream *self = PIPE_INPUT_STREAM(stream);<br>
     GSource *pollable_source;<br>
<br>
-    g_return_val_if_fail (self->source == NULL ||<br>
-                          g_source_is_destroyed (self->source), NULL);<br>
-<br>
     if (self->source && g_source_is_destroyed (self->source))<br>
         g_source_unref (self->source);<br>
<br>
@@ -416,9 +413,6 @@ pipe_output_stream_create_source (GPollableOutputStream *stream,<br>
     PipeOutputStream *self = PIPE_OUTPUT_STREAM(stream);<br>
     GSource *pollable_source;<br>
<br>
-    g_return_val_if_fail (self->source == NULL ||<br>
-                          g_source_is_destroyed (self->source), NULL);<br>
-<br>
     if (self->source && g_source_is_destroyed (self->source))<br>
         g_source_unref (self->source);<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.4.1<br>
<br>
_______________________________________________<br>
Spice-devel mailing list<br>
<a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Marc-André Lureau</div>
</div></div></div>