On Thu, Aug 04, 2016 at 03:13:38PM +0200, Victor Toso wrote: > Hi, > > On Wed, Aug 03, 2016 at 09:49:51AM +0200, Christophe Fergeau wrote: > > Rather than returning the whole ConnectAsyncData struct with > > g_task_return_pointer(), we can return only the GIOStream object as this > > is what we are interested in. > > This has the side-effect of fixing a ConnectAsyncData leak as after > > calling g_task_propagate_pointer() the old code had ownership of the > > ConnectAsyncData instance but was never freeing it. > > --- > > src/wocky-http-proxy.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/src/wocky-http-proxy.c b/src/wocky-http-proxy.c > > index f62f1fb..d1519b8 100644 > > --- a/src/wocky-http-proxy.c > > +++ b/src/wocky-http-proxy.c > > @@ -454,7 +454,9 @@ reply_read_cb (GObject *source, > > return; > > } > > > > - g_task_return_pointer (data->task, data, (GDestroyNotify) free_connect_data); > > + g_task_return_pointer (data->task, data->io_stream, (GDestroyNotify) g_object_unref); > > + data->io_stream = NULL; > > + free_connect_data (data); > > g_object_unref (data->task); > > You need to move the g_object_unref(data->task) to be before > free_connect_data() (or put the next patch before this one?) Ah definitely, thanks! Yeah, I artificially recreated this patch while splitting the changes, this shows here :) Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel