soup-session: fix memory leak
authorXan Lopez <xan@igalia.com>
Tue, 26 Mar 2013 15:20:38 +0000 (16:20 +0100)
committerXan Lopez <xan@igalia.com>
Tue, 26 Mar 2013 15:20:38 +0000 (16:20 +0100)
Do not steal the stream from the GTask, otherwise its destruction
method will never run and it will be leaked.

https://bugzilla.gnome.org/show_bug.cgi?id=696594

libsoup/soup-session.c

index 14e2be4..186d57a 100644 (file)
@@ -3899,7 +3899,7 @@ idle_return_from_cache_cb (gpointer data)
                return FALSE;
        }
 
-       istream = g_object_steal_data (G_OBJECT (task), "SoupSession:istream");
+       istream = g_object_get_data (G_OBJECT (task), "SoupSession:istream");
        async_return_from_cache (item, istream);
 
        return FALSE;