[gtk+/win32-theme] win32-theme: Fix some leaks during parse errors
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/win32-theme] win32-theme: Fix some leaks during parse errors
- Date: Wed, 16 Nov 2011 12:09:44 +0000 (UTC)
commit 0937294efb33177745fda54d0da894aeadd72314
Author: Alexander Larsson <alexl redhat com>
Date: Wed Nov 16 12:18:11 2011 +0100
win32-theme: Fix some leaks during parse errors
gtk/gtkwin32theme.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwin32theme.c b/gtk/gtkwin32theme.c
index f215017..71f7ad2 100644
--- a/gtk/gtkwin32theme.c
+++ b/gtk/gtkwin32theme.c
@@ -273,6 +273,7 @@ _gtk_win32_theme_part_parse (GtkCssParser *parser,
if (! _gtk_css_parser_try (parser, ",", TRUE))
{
+ g_free (class);
_gtk_css_parser_error (parser,
"Expected ','");
return 0;
@@ -280,12 +281,14 @@ _gtk_win32_theme_part_parse (GtkCssParser *parser,
if (!_gtk_css_parser_try_int (parser, &xp_part))
{
+ g_free (class);
_gtk_css_parser_error (parser, "Expected a valid integer value");
- return FALSE;
+ return 0;
}
if (! _gtk_css_parser_try (parser, ",", TRUE))
{
+ g_free (class);
_gtk_css_parser_error (parser,
"Expected ','");
return 0;
@@ -293,12 +296,14 @@ _gtk_win32_theme_part_parse (GtkCssParser *parser,
if (!_gtk_css_parser_try_int (parser, &state))
{
+ g_free (class);
_gtk_css_parser_error (parser, "Expected a valid integer value");
return 0;
}
if (!_gtk_css_parser_try (parser, ")", TRUE))
{
+ g_free (class);
_gtk_css_parser_error (parser,
"Expected ')'");
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]