[PATCH] fix a memory leak
Aleksander Morgado
aleksander at aleksander.es
Sun Aug 2 00:09:53 PDT 2015
On Fri, Jul 31, 2015 at 6:40 PM, Yunlian Jiang <yunlian at chromium.org> wrote:
> The bug entry is at
> https://code.google.com/p/chromium/issues/detail?id=515929
>
> The patch is below
>
> ---
> src/mm-base-manager.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/mm-base-manager.c b/src/mm-base-manager.c
> index fdcd037..de3291c 100644
> --- a/src/mm-base-manager.c
> +++ b/src/mm-base-manager.c
> @@ -752,6 +752,7 @@ handle_set_profile (MmGdbusTest *skeleton,
> g_hash_table_insert (self->priv->devices,
> g_strdup (physdev),
> device);
> + g_free(physdev);
>
> /* Grab virtual ports */
> mm_device_virtual_grab_ports (device, (const gchar **)ports);
> --
> 2.5.0.rc2.392.g76e840b
Thanks for the report; are you actively using the Test interface yourselves?
I didn't push your patch though; instead I just avoided the g_strdup()
when inserting in the hash table, which saves us one unnecessary
alloc.
http://cgit.freedesktop.org/ModemManager/ModemManager/commit/?id=0337781ba746fb869198cff9705e521a2722b26d
Cheers!
--
Aleksander
https://aleksander.es
More information about the ModemManager-devel
mailing list