[gtk/matthiasc/for-master] gsk: Fix a transform leak
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master] gsk: Fix a transform leak
- Date: Wed, 8 Jul 2020 21:45:30 +0000 (UTC)
commit 13b37b0ba46a56e0a4168ecee7ab685d4bb64c25
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jul 8 16:29:32 2020 -0400
gsk: Fix a transform leak
This was found by running our testsuite under asan.
gsk/gsktransform.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]