[Spice-devel] [PATCH spice-gtk] display-name: g_strsplit result must be freed with g_strfreev
Hans de Goede
hdegoede at redhat.com
Thu Feb 9 06:46:20 PST 2012
Hi,
On 02/09/2012 02:55 PM, Marc-André Lureau wrote:
>
>
> ----- 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.
Ah, ok, dropping this from my local patch queue.
Regards,
Hans
More information about the Spice-devel
mailing list