[gupnp] RootDevice: Do not leak context reference



commit 9c0770fbefe1b6c1fe34febbdecb408269c16d42
Author: Jens Georg <mail jensge org>
Date:   Tue Jul 27 23:14:46 2021 +0200

    RootDevice: Do not leak context reference

 libgupnp/gupnp-root-device.c | 5 +----
 1 file changed, 1 insertion(+), 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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]