[gupnp] ServicceProxy: Do not leak unsubscribe message
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp] ServicceProxy: Do not leak unsubscribe message
- Date: Sun, 9 Jan 2022 15:21:24 +0000 (UTC)
commit 3e463fc0dacfa0e478c8978f3872bcf98a00d99f
Author: Jens Georg <mail jensge org>
Date: Sun Jan 9 14:03:30 2022 +0100
ServicceProxy: Do not leak unsubscribe message
libgupnp/gupnp-service-proxy.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index ea9a55a..0cca2a8 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -2010,15 +2010,6 @@ subscribe (GUPnPServiceProxy *proxy)
data);
}
-static void
-soup_message_dont_care_for_result (GObject *source,
- GAsyncResult *res,
- gpointer user_data)
-{
- GInputStream *s =
- soup_session_send_finish (SOUP_SESSION (source), res, NULL);
- g_clear_object (&s);
-}
/*
* Unsubscribe from this service.
*/
@@ -2061,13 +2052,15 @@ unsubscribe (GUPnPServiceProxy *proxy)
/* And queue it */
session = gupnp_context_get_session (context);
+ // We do not care about the result of that message
soup_session_send_async (
session,
msg,
G_PRIORITY_DEFAULT,
NULL,
- soup_message_dont_care_for_result,
+ NULL,
NULL);
+ g_object_unref (msg);
}
/* Reset SID */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]