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

Aleksander Morgado aleksander at aleksander.es
Wed Jan 4 12:53:34 UTC 2017


On 04/01/17 13:15, Thomas Haller wrote:
> Fixes: 3206e9566392e8a9678bbd49e0de9bb21ed75291

I've fixed-up the commit message to say "MMModem" instead of "NMModem"
and also pushed a follow up commit to explicitly init and clear the
mutex associated with the ports.

Both commits to git master, mm-1-6, mm-1-4 and mm-1-2.

Thanks!

> ---
>  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);
>  }
> 


-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list