From 9f0989ce617f572433841492d06efcf6dbcb9f67 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Sun, 24 Jun 2018 21:23:10 +0200 Subject: libqmi-glib,device: don't leak the inner MbimDevice (cherry picked from commit 29b43a7d0fb413909132011fac4afe91822e7375) --- src/libqmi-glib/qmi-device.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libqmi-glib/qmi-device.c b/src/libqmi-glib/qmi-device.c index c793171..89a5ee5 100644 --- a/src/libqmi-glib/qmi-device.c +++ b/src/libqmi-glib/qmi-device.c @@ -3056,6 +3056,14 @@ dispose (GObject *object) (GHRFunc)foreach_warning, self); +#if defined MBIM_QMUX_ENABLED + if (self->priv->mbimdev) { + g_warning ("[%s] MBIM device wasn't explicitly closed", + self->priv->path_display); + g_clear_object (&self->priv->mbimdev); + } +#endif + if (self->priv->sync_indication_id && self->priv->client_ctl) { g_signal_handler_disconnect (self->priv->client_ctl, -- cgit v1.2.3