[Spice-devel] [PATCH spice-gtk] display-name: g_strsplit result must be freed with g_strfreev

Marc-André Lureau mlureau at redhat.com
Thu Feb 9 05:55:54 PST 2012



----- Mensaje original -----
> Note I checked if we needed to propagate this change to gnome-desktop
> as we copied this from gnome-desktop, but gnome-desktop has since
> rewritten
> this bit to no longer us g_strsplit.
> 
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
>  gtk/display/display-name.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/gtk/display/display-name.c b/gtk/display/display-name.c
> index d38eb2f..e4112ff 100644
> --- a/gtk/display/display-name.c
> +++ b/gtk/display/display-name.c
> @@ -217,7 +217,7 @@ read_pnp_ids (void)
>                   g_hash_table_insert (pnp_ids, code, name);
>               }
>          }
> -        g_free (lines);
> +        g_strfreev (lines);

nack

The pnp_ids hashtable keeps a ref on the strings, and unref them when the key/val is changed.

>          g_free (contents);
>      }
>  }
> --
> 1.7.7.6
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 


More information about the Spice-devel mailing list