summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2021-07-27 23:14:46 +0200
committerJens Georg <mail@jensge.org>2021-07-27 23:17:05 +0200
commit9c0770fbefe1b6c1fe34febbdecb408269c16d42 (patch)
tree1a92d0e8eb7e64da8ce5fa0812b8a0a5668a160b
parentd6e5d68376d9140e527a44c26763fd0f41d2ba79 (diff)
downloadgupnp-9c0770fbefe1b6c1fe34febbdecb408269c16d42.tar.gz
RootDevice: Do not leak context reference
-rw-r--r--libgupnp/gupnp-root-device.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libgupnp/gupnp-root-device.c b/libgupnp/gupnp-root-device.c
index 48987c4..0ba44f9 100644
--- a/libgupnp/gupnp-root-device.c
+++ b/libgupnp/gupnp-root-device.c
@@ -300,10 +300,7 @@ gupnp_root_device_initable_init (GInitable *initable,
location = NULL;
- g_object_get (G_OBJECT (device),
- "context", &context,
- NULL);
-
+ context = gupnp_device_info_get_context (GUPNP_DEVICE_INFO (device));
if (context == NULL) {
g_set_error_literal (error,
GUPNP_ROOT_DEVICE_ERROR,