mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-06 10:50:08 +00:00
Fixed possible segmentation fault while freeing size request caches.
This commit is contained in:
parent
38b5c8cf45
commit
5989a6405f
@ -112,7 +112,7 @@ clear_cache (SizeRequestCache *cache,
|
|||||||
|
|
||||||
if (sizes)
|
if (sizes)
|
||||||
{
|
{
|
||||||
for (i = 0; sizes[i] != NULL; i++)
|
for (i = 0; i < GTK_SIZE_REQUEST_CACHED_SIZES && sizes[i] != NULL; i++)
|
||||||
g_slice_free (SizeRequest, sizes[i]);
|
g_slice_free (SizeRequest, sizes[i]);
|
||||||
|
|
||||||
g_slice_free1 (sizeof (SizeRequest *) * GTK_SIZE_REQUEST_CACHED_SIZES, sizes);
|
g_slice_free1 (sizeof (SizeRequest *) * GTK_SIZE_REQUEST_CACHED_SIZES, sizes);
|
||||||
|
Loading…
Reference in New Issue
Block a user