summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2018-03-31 11:41:13 +0200
committerTimm Bäder <mail@baedert.org>2018-03-31 14:45:03 +0200
commitd9136fb9442a3ae9e354038c61d7b4832ba3aca9 (patch)
treec40ca1d84cd26ce1f57e5f9a4dbbb39dc4112a6b
parent08296b8aeed09a45bf73d2889067ef78f4cba1e1 (diff)
downloadgtk+-d9136fb9442a3ae9e354038c61d7b4832ba3aca9.tar.gz
snapshot: Plug memory leak when collecting rounded clip nodes
-rw-r--r--gtk/gtksnapshot.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c
index 31d011c511..98994084ce 100644
--- a/gtk/gtksnapshot.c
+++ b/gtk/gtksnapshot.c
@@ -846,7 +846,11 @@ gtk_snapshot_collect_rounded_clip (GtkSnapshot *snapshot,
if (clip_node->bounds.size.width == 0 ||
clip_node->bounds.size.height == 0)
- return NULL;
+ {
+ gsk_render_node_unref (node);
+ gsk_render_node_unref (clip_node);
+ return NULL;
+ }
if (name)
gsk_render_node_set_name (clip_node, name);