summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2022-11-02 16:58:15 +0100
committerJens Georg <mail@jensge.org>2022-11-02 17:01:52 +0100
commit1b1f74a3c56ae7e0dddd2ea33c3276987511774c (patch)
tree19b9d7f65baf51c061d709d76592631f66188cda
parent6a0fc681f5bd433a83c79d7dd99623796383aab5 (diff)
downloadgupnp-1b1f74a3c56ae7e0dddd2ea33c3276987511774c.tar.gz
ContextManager: Fix filtering unavailable contexts
- Unref the actual context, not the list - Free the list element
-rw-r--r--libgupnp/gupnp-context-manager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgupnp/gupnp-context-manager.c b/libgupnp/gupnp-context-manager.c
index b4ac4d9..5d19597 100644
--- a/libgupnp/gupnp-context-manager.c
+++ b/libgupnp/gupnp-context-manager.c
@@ -208,7 +208,8 @@ on_context_unavailable (GUPnPContextManager *manager,
g_signal_stop_emission_by_name (manager, "context-unavailable");
priv->filtered = g_list_remove_link (priv->filtered, ctx);
- g_object_unref (ctx);
+ g_object_unref (ctx->data);
+ g_list_free (ctx);
}
g_hash_table_remove (priv->contexts, context);