mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
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. https://gitlab.gnome.org/GNOME/mutter/merge_requests/786
This commit is contained in:
parent
2c1553570f
commit
5eaf655224
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user