diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-07-08 16:29:32 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-07-08 17:44:08 -0400 |
commit | 13b37b0ba46a56e0a4168ecee7ab685d4bb64c25 (patch) | |
tree | bedda8e1be8c994ac0c18df12f852675a3fff000 /gsk | |
parent | 779c71b66db507dba57d255832eeb5f2b041918b (diff) | |
download | gtk+-13b37b0ba46a56e0a4168ecee7ab685d4bb64c25.tar.gz |
gsk: Fix a transform leak
This was found by running our testsuite under asan.
Diffstat (limited to 'gsk')
-rw-r--r-- | gsk/gsktransform.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gsk/gsktransform.c b/gsk/gsktransform.c index 002a52a89b..aed9eae994 100644 --- a/gsk/gsktransform.c +++ b/gsk/gsktransform.c @@ -123,7 +123,8 @@ gsk_transform_alloc (const GskTransformClass *transform_class, self->transform_class = transform_class; self->category = next ? MIN (category, next->category) : category; - self->next = gsk_transform_is_identity (next) ? NULL : next; + self->next = gsk_transform_is_identity (next) ? NULL : gsk_transform_ref (next); + g_clear_pointer (&next, gsk_transform_unref); return self; } |