[gnome-remote-desktop] rdp/nw-auto: Also clear GMutexes on destruction



commit 0855858dec5f7dac5077139f259e4ebc1748146b
Author: Pascal Nowack <Pascal Nowack gmx de>
Date:   Thu Nov 18 12:29:46 2021 +0100

    rdp/nw-auto: Also clear GMutexes on destruction

 src/grd-rdp-network-autodetection.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/src/grd-rdp-network-autodetection.c b/src/grd-rdp-network-autodetection.c
index 63fa44f..3eb30a6 100644
--- a/src/grd-rdp-network-autodetection.c
+++ b/src/grd-rdp-network-autodetection.c
@@ -410,6 +410,19 @@ grd_rdp_network_autodetection_dispose (GObject *object)
   G_OBJECT_CLASS (grd_rdp_network_autodetection_parent_class)->dispose (object);
 }
 
+static void
+grd_rdp_network_autodetection_finalize (GObject *object)
+{
+  GrdRdpNetworkAutodetection *network_autodetection =
+    GRD_RDP_NETWORK_AUTODETECTION (object);
+
+  g_mutex_clear (&network_autodetection->sequence_mutex);
+  g_mutex_clear (&network_autodetection->consumer_mutex);
+  g_mutex_clear (&network_autodetection->shutdown_mutex);
+
+  G_OBJECT_CLASS (grd_rdp_network_autodetection_parent_class)->finalize (object);
+}
+
 static void
 grd_rdp_network_autodetection_init (GrdRdpNetworkAutodetection *network_autodetection)
 {
@@ -428,4 +441,5 @@ grd_rdp_network_autodetection_class_init (GrdRdpNetworkAutodetectionClass *klass
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
   object_class->dispose = grd_rdp_network_autodetection_dispose;
+  object_class->finalize = grd_rdp_network_autodetection_finalize;
 }


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