[libnma] nma-ws: properly dispose wireless security objects



commit 55e33e4ce01c8b2b8dc98a5ee40a5636579cd577
Author: Beniamino Galvani <bgalvani redhat com>
Date:   Sat Apr 11 15:44:17 2020 +0200

    nma-ws: properly dispose wireless security objects
    
    Chain up to parent to properly free resources on dispose().
    
    Fixes: b61cc1b9fa040 ("nma-ws: add")
    
    https://gitlab.gnome.org/GNOME/libnma/-/issues/7

 src/nma-ws/nma-ws-802-1x.c  | 2 ++
 src/nma-ws/nma-ws-leap.c    | 2 ++
 src/nma-ws/nma-ws-sae.c     | 2 ++
 src/nma-ws/nma-ws-wep-key.c | 2 ++
 src/nma-ws/nma-ws-wpa-psk.c | 2 ++
 5 files changed, 10 insertions(+)
---
diff --git a/src/nma-ws/nma-ws-802-1x.c b/src/nma-ws/nma-ws-802-1x.c
index ba348266..0c148ce5 100644
--- a/src/nma-ws/nma-ws-802-1x.c
+++ b/src/nma-ws/nma-ws-802-1x.c
@@ -482,6 +482,8 @@ dispose (GObject *object)
        g_clear_pointer (&self->secrets_hints, g_strfreev);
        g_clear_pointer (&self->username, g_free);
        g_clear_pointer (&self->password, g_free);
+
+       G_OBJECT_CLASS (nma_ws_802_1x_parent_class)->dispose (object);
 }
 
 static void
diff --git a/src/nma-ws/nma-ws-leap.c b/src/nma-ws/nma-ws-leap.c
index f90d43aa..df6d2dde 100644
--- a/src/nma-ws/nma-ws-leap.c
+++ b/src/nma-ws/nma-ws-leap.c
@@ -260,6 +260,8 @@ dispose (GObject *object)
        NMAWsLeap *self = NMA_WS_LEAP (object);
 
        g_clear_object (&self->connection);
+
+       G_OBJECT_CLASS (nma_ws_leap_parent_class)->dispose (object);
 }
 
 static void
diff --git a/src/nma-ws/nma-ws-sae.c b/src/nma-ws/nma-ws-sae.c
index e3454bbd..00fb6ff5 100644
--- a/src/nma-ws/nma-ws-sae.c
+++ b/src/nma-ws/nma-ws-sae.c
@@ -252,6 +252,8 @@ dispose (GObject *object)
        NMAWsSae *self = NMA_WS_SAE (object);
 
        g_clear_object (&self->connection);
+
+       G_OBJECT_CLASS (nma_ws_sae_parent_class)->dispose (object);
 }
 
 static void
diff --git a/src/nma-ws/nma-ws-wep-key.c b/src/nma-ws/nma-ws-wep-key.c
index cae8c272..992aabf7 100644
--- a/src/nma-ws/nma-ws-wep-key.c
+++ b/src/nma-ws/nma-ws-wep-key.c
@@ -404,6 +404,8 @@ dispose (GObject *object)
        NMAWsWepKey *self = NMA_WS_WEP_KEY (object);
 
        g_clear_object (&self->connection);
+
+       G_OBJECT_CLASS (nma_ws_wep_key_parent_class)->dispose (object);
 }
 
 static void
diff --git a/src/nma-ws/nma-ws-wpa-psk.c b/src/nma-ws/nma-ws-wpa-psk.c
index 1c73922a..27604960 100644
--- a/src/nma-ws/nma-ws-wpa-psk.c
+++ b/src/nma-ws/nma-ws-wpa-psk.c
@@ -270,6 +270,8 @@ dispose (GObject *object)
        NMAWsWpaPsk *self = NMA_WS_WPA_PSK (object);
 
        g_clear_object (&self->connection);
+
+       G_OBJECT_CLASS (nma_ws_wpa_psk_parent_class)->dispose (object);
 }
 
 static void


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