summaryrefslogtreecommitdiff
path: root/libgupnp
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2022-06-10 01:35:12 +0200
committerJens Georg <mail@jensge.org>2022-06-10 01:35:12 +0200
commit256e178c8988373382ae959bdd565d1504dbe42f (patch)
treea3e9e974830fbc31500e7a35e0da8821704a77ec /libgupnp
parent7722d352895616cf38948cf56b1a4699e62ec0f6 (diff)
downloadgupnp-256e178c8988373382ae959bdd565d1504dbe42f.tar.gz
ServiceProxy: Fix leak in subscribe
The code did close, but not unref the InputStream. That caused a leak of the input stream and the SoupMessage for each (re-)subscription. Fixes #70
Diffstat (limited to 'libgupnp')
-rw-r--r--libgupnp/gupnp-service-proxy.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index 5159d6a..466885f 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -1158,6 +1158,7 @@ subscribe_got_response (GObject *source, GAsyncResult *res, gpointer user_data)
// We don't need the body, it should be empty anyway
g_input_stream_close (is, NULL, NULL);
+ g_object_unref (is);
/* Remove subscription timeout */
g_clear_pointer (&priv->subscription_timeout_src, g_source_destroy);