[gtk+] Plug a small memory leak
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Plug a small memory leak
- Date: Thu, 13 Sep 2012 04:13:57 +0000 (UTC)
commit ba2e43111e7fccf9c13d20a4eed3d6dc1ab50d54
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Sep 13 00:14:16 2012 -0400
Plug a small memory leak
gtk/deprecated/gtkstyle.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/deprecated/gtkstyle.c b/gtk/deprecated/gtkstyle.c
index d6ea17e..c981aaa 100644
--- a/gtk/deprecated/gtkstyle.c
+++ b/gtk/deprecated/gtkstyle.c
@@ -655,9 +655,15 @@ set_color_from_context (GtkStyle *style,
break;
}
- if (!color || !(color->alpha > 0.01))
+ if (!color)
return FALSE;
+ if (!(color->alpha > 0.01))
+ {
+ gdk_rgba_free (color);
+ return FALSE;
+ }
+
dest->pixel = 0;
dest->red = CLAMP ((guint) (color->red * 65535), 0, 65535);
dest->green = CLAMP ((guint) (color->green * 65535), 0, 65535);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]