[gtk/matthiasc/for-master] widget: Fix a memory leak
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master] widget: Fix a memory leak
- Date: Wed, 25 Dec 2019 06:09:05 +0000 (UTC)
commit e03f4565a73d6be7a055338fccc9ff2d11de3f45
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Dec 25 00:40:32 2019 -0500
widget: Fix a memory leak
The transform passed to gtk_widget_allocate is
transfer full, so we must consume the reference
before returning.
gtk/gtkwidget.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 1c03acb20f..c1bd09842e 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -4317,7 +4317,10 @@ gtk_widget_allocate (GtkWidget *widget,
gtk_widget_push_verify_invariants (widget);
if (!priv->visible && !GTK_IS_ROOT (widget))
- goto out;
+ {
+ gsk_transform_unref (transform);
+ goto out;
+ }
#ifdef G_ENABLE_DEBUG
if (GTK_DISPLAY_DEBUG_CHECK (_gtk_widget_get_display (widget), RESIZE))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]