libpurple/protocols/sametime/sametime.c

changeset 40811
44c107f92a65
parent 40800
be00e9c87cb7
child 40813
71305a7d7423
--- a/libpurple/protocols/sametime/sametime.c	Fri Mar 05 03:31:29 2021 -0600
+++ b/libpurple/protocols/sametime/sametime.c	Fri Mar 05 03:39:39 2021 -0600
@@ -1749,7 +1749,7 @@
   }
 
   pd->stream = G_IO_STREAM(sockconn);
-  pd->input = g_io_stream_get_input_stream(pd->stream);
+  pd->input = g_object_ref(g_io_stream_get_input_stream(pd->stream));
   pd->output = purple_queued_output_stream_new(
           g_io_stream_get_output_stream(pd->stream));
   source = g_pollable_input_stream_create_source(
@@ -3095,7 +3095,7 @@
 
   g_clear_object(&pd->cancellable);
   g_hash_table_destroy(pd->group_list_map);
-  pd->input = NULL;
+  g_clear_object(&pd->input);
   g_clear_object(&pd->output);
   g_clear_object(&pd->stream);
 

mercurial