[gnome-network-displays/cc-tmp: 43/80] cc: input stream should not be freed




commit 3e254bc19c95494f55e467d26c522679a5a42dfa
Author: Anupam Kumar <kyteinsky gmail com>
Date:   Sat Sep 3 17:54:12 2022 +0530

    cc: input stream should not be freed

 src/cc/cc-comm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/cc/cc-comm.c b/src/cc/cc-comm.c
index cc83f97..aa74409 100644
--- a/src/cc/cc-comm.c
+++ b/src/cc/cc-comm.c
@@ -161,7 +161,6 @@ cc_comm_header_read_cb (GObject      *source_object,
     return;
 
   g_autoptr (GError) error = NULL;
-  g_autoptr (GInputStream) istream = NULL;
   gboolean success;
   gsize io_bytes;
   guint32 message_size;
@@ -178,7 +177,7 @@ cc_comm_header_read_cb (GObject      *source_object,
       return;
     }
 
-  istream = g_io_stream_get_input_stream (G_IO_STREAM (comm->con));
+  GInputStream *istream = istream = g_io_stream_get_input_stream (G_IO_STREAM (comm->con));
   if (G_INPUT_STREAM (source_object) != istream)
     {
       g_warning ("CcComm: Old stream encountered while reading header, ignoring");


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