gsk: gsk_border_node_new(): Fix dead cleanup code

The `gdk_color_finish()` calls are currently after the `return`,
so they are never executed. Move the `return` below the cleanup
code to avoid that.

Fixes: bd3d1f7715 ("gsk: Add private border node api")
This commit is contained in:
Barnabás Pőcze 2024-10-12 23:00:27 +02:00
parent 06b8863bf7
commit 3b0a4386a8

View File

@ -2586,15 +2586,18 @@ gsk_border_node_new (const GskRoundedRect *outline,
const float border_width[4],
const GdkRGBA border_color[4])
{
GskRenderNode *node;
GdkColor color[4];
for (int i = 0; i < 4; i++)
gdk_color_init_from_rgba (&color[i], &border_color[i]);
return gsk_border_node_new2 (outline, border_width, color);
node = gsk_border_node_new2 (outline, border_width, color);
for (int i = 0; i < 4; i++)
gdk_color_finish (&color[i]);
return node;
}
/*< private >