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

xprops: Use g_new0 instead of calloc in wm_hints_from_results()

Switch the memory allocation in wm_hints_from_results from a calloc call
without error-checking to g_new0 and just the free path accordingly.

!786
parent 89cd9d38
......@@ -695,7 +695,7 @@ wm_hints_from_results (GetPropertyResults *results,
return FALSE;
}
hints = calloc (1, sizeof (XWMHints));
hints = g_new0 (XWMHints, 1);
raw = (xPropWMHints*) results->prop;
......@@ -1089,7 +1089,7 @@ free_value (MetaPropValue *value)
g_free (value->v.str);
break;
case META_PROP_VALUE_WM_HINTS:
free (value->v.wm_hints);
g_free (value->v.wm_hints);
break;
case META_PROP_VALUE_CLASS_HINT:
free (value->v.class_hint.res_class);
......
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