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

xprops: Free meta_prop_get_cardinal_list() return value with g_free()

meta_prop_get_cardinal_list directly passes through the results->prop
pointer which is g_malloc memory, so we should free the buffer it
returns with g_free.

!786
parent 2c155357
......@@ -1320,7 +1320,7 @@ meta_x11_display_new (MetaDisplay *display, GError **error)
&list, &n_items))
{
num = list[0];
meta_XFree (list);
g_free (list);
}
if (num > meta_workspace_manager_get_n_workspaces (display->workspace_manager))
......@@ -2186,7 +2186,7 @@ meta_x11_display_update_workspace_layout (MetaX11Display *x11_display)
"(3 is accepted for backwards compat)\n", n_items);
}
meta_XFree (list);
g_free (list);
meta_workspace_manager_update_workspace_layout (workspace_manager,
starting_corner,
......
......@@ -1637,7 +1637,7 @@ meta_window_x11_update_struts (MetaWindow *window)
struts[0], struts[1], struts[2], struts[3],
window->desc);
}
meta_XFree (struts);
g_free (struts);
}
else
{
......@@ -1696,7 +1696,7 @@ meta_window_x11_update_struts (MetaWindow *window)
struts[0], struts[1], struts[2], struts[3],
window->desc);
}
meta_XFree (struts);
g_free (struts);
}
else if (!new_struts)
{
......
......@@ -1111,7 +1111,7 @@ free_value (MetaPropValue *value)
g_strfreev (value->v.string_list.strings);
break;
case META_PROP_VALUE_CARDINAL_LIST:
free (value->v.cardinal_list.cardinals);
g_free (value->v.cardinal_list.cardinals);
break;
case META_PROP_VALUE_SYNC_COUNTER:
break;
......
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