[PATCH 1/1] libmm: fix memleak of NMModem's ports

Thomas Haller thaller at redhat.com
Wed Jan 4 12:15:31 UTC 2017


Fixes: 3206e9566392e8a9678bbd49e0de9bb21ed75291
---
 libmm-glib/mm-modem.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libmm-glib/mm-modem.c b/libmm-glib/mm-modem.c
index 9ac850b..9c6819f 100644
--- a/libmm-glib/mm-modem.c
+++ b/libmm-glib/mm-modem.c
@@ -3008,6 +3008,8 @@ finalize (GObject *object)
         g_array_unref (self->priv->supported_bands);
     if (self->priv->current_bands)
         g_array_unref (self->priv->current_bands);
+    if (self->priv->ports)
+       g_array_unref (self->priv->ports);
 
     G_OBJECT_CLASS (mm_modem_parent_class)->finalize (object);
 }
-- 
2.9.3



More information about the ModemManager-devel mailing list