[gupnp] context-manager: Do not leak reference on context
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp] context-manager: Do not leak reference on context
- Date: Sat, 7 Aug 2021 18:15:59 +0000 (UTC)
commit 7a575068b4fa9e75e58d832f4e391790b6886533
Author: Jens Georg <mail jensge org>
Date: Sat Aug 7 20:06:58 2021 +0200
context-manager: Do not leak reference on context
Applying the filter will leak a reference on the context.
Unref the context after use.
libgupnp/gupnp-context-manager.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/libgupnp/gupnp-context-manager.c b/libgupnp/gupnp-context-manager.c
index 534899d..c4948d2 100644
--- a/libgupnp/gupnp-context-manager.c
+++ b/libgupnp/gupnp-context-manager.c
@@ -271,6 +271,8 @@ gupnp_context_manager_filter_context (GUPnPContextFilter *context_filter,
match = gupnp_context_filter_check_context (
context_filter,
context);
+
+ g_object_unref (context);
} else {
/* Re-activate all context, if needed */
match = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]