summaryrefslogtreecommitdiff
path: root/gtk/deprecated
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2012-09-13 00:14:16 -0400
committerMatthias Clasen <mclasen@redhat.com>2012-09-13 00:14:16 -0400
commitba2e43111e7fccf9c13d20a4eed3d6dc1ab50d54 (patch)
tree27e0202579f72437483e8d8df08bbacb12e14714 /gtk/deprecated
parent357db76c6274c1b116ae1f0e393080ed12ccd895 (diff)
downloadgtk+-ba2e43111e7fccf9c13d20a4eed3d6dc1ab50d54.tar.gz
Plug a small memory leak
Diffstat (limited to 'gtk/deprecated')
-rw-r--r--gtk/deprecated/gtkstyle.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/deprecated/gtkstyle.c b/gtk/deprecated/gtkstyle.c
index d6ea17e80a..c981aaa8dd 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);