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

xprops: Use g_free instead of XFree in text_property_from_results()

results->prop is g_malloc memory so it should be free-ed with g_free not
XFree. The same applies to the return value of text_property_from_results
itself.

!786
parent 488991b0
......@@ -659,15 +659,13 @@ text_property_from_results (GetPropertyResults *results,
*utf8_str_p = NULL;
tp.value = results->prop;
results->prop = NULL;
tp.encoding = results->type;
tp.format = results->format;
tp.nitems = results->n_items;
*utf8_str_p = text_property_to_utf8 (results->x11_display->xdisplay, &tp);
if (tp.value != NULL)
XFree (tp.value);
g_clear_pointer (&results->prop, g_free);
return *utf8_str_p != NULL;
}
......@@ -1088,7 +1086,7 @@ free_value (MetaPropValue *value)
g_free (value->v.atom_list.atoms);
break;
case META_PROP_VALUE_TEXT_PROPERTY:
free (value->v.str);
g_free (value->v.str);
break;
case META_PROP_VALUE_WM_HINTS:
free (value->v.wm_hints);
......
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