[glib] gvariant: Fix minor memory leak on error handling path
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gvariant: Fix minor memory leak on error handling path
- Date: Wed, 8 Nov 2017 12:38:17 +0000 (UTC)
commit cd0bbbf1ef3d8ff273dee80c1039157c1474715d
Author: Sanjeev <sanjeev1 k samsung com>
Date: Wed Nov 8 12:36:26 2017 +0000
gvariant: Fix minor memory leak on error handling path
(Commit message by Philip Withnall.)
https://bugzilla.gnome.org/show_bug.cgi?id=760022
glib/gvariant-parser.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/glib/gvariant-parser.c b/glib/gvariant-parser.c
index e4ba192..3261bc1 100644
--- a/glib/gvariant-parser.c
+++ b/glib/gvariant-parser.c
@@ -1724,6 +1724,7 @@ bytestring_parse (TokenStream *stream,
parser_set_error (error, &ref, NULL,
G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT,
"unterminated string constant");
+ g_free (str);
g_free (token);
return NULL;
@@ -1734,6 +1735,7 @@ bytestring_parse (TokenStream *stream,
parser_set_error (error, &ref, NULL,
G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT,
"unterminated string constant");
+ g_free (str);
g_free (token);
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]