Commit e2330617 authored by Hans de Goede's avatar Hans de Goede Committed by Jonas Ådahl

xprops: Free latin1/utf8_string_from_results() return value with g_free()

latin1_string_from_results and utf8_string_from_results use g_strndup,
so the returned string should be freed with g_free, rather then with
free or XFree. This fixes all free-s of buffers returned by these 2
functions to properly use g_free.

!786
parent 5e6d98e7
......@@ -180,7 +180,7 @@ update_sm_hints (MetaWindow *window)
&str))
{
window->sm_client_id = g_strdup (str);
meta_XFree (str);
g_free (str);
}
}
else
......@@ -204,7 +204,7 @@ update_sm_hints (MetaWindow *window)
window->desc);
window->sm_client_id = g_strdup (str);
meta_XFree (str);
g_free (str);
}
}
}
......
......@@ -993,7 +993,7 @@ meta_prop_get_values (MetaX11Display *x11_display,
{
char *new_str;
new_str = latin1_to_utf8 (values[i].v.str);
free (values[i].v.str);
g_free (values[i].v.str);
values[i].v.str = new_str;
}
break;
......@@ -1072,7 +1072,7 @@ free_value (MetaPropValue *value)
break;
case META_PROP_VALUE_UTF8:
case META_PROP_VALUE_STRING:
free (value->v.str);
g_free (value->v.str);
break;
case META_PROP_VALUE_STRING_AS_UTF8:
g_free (value->v.str);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment