From 7c3b8e976cc34517ad4c9c28950c758a13cf88bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= Date: Wed, 8 Feb 2017 22:27:11 +0100 Subject: [PATCH 2/9] Fix a memory leak on an error path of lookup_asv (twice) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://bugs.freedesktop.org/show_bug.cgi?id=99741 Signed-off-by: Miloslav Trmač --- src/polkit/polkitidentity.c | 1 + src/polkit/polkitsubject.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/polkit/polkitidentity.c b/src/polkit/polkitidentity.c index b0b46bf..3aa1f7f 100644 --- a/src/polkit/polkitidentity.c +++ b/src/polkit/polkitidentity.c @@ -266,6 +266,7 @@ lookup_asv (GVariant *dict, g_variant_get_type_string (value), type_string); g_free (type_string); + g_variant_unref (value); goto out; } ret = value; diff --git a/src/polkit/polkitsubject.c b/src/polkit/polkitsubject.c index 4a36941..d4c1182 100644 --- a/src/polkit/polkitsubject.c +++ b/src/polkit/polkitsubject.c @@ -362,6 +362,7 @@ lookup_asv (GVariant *dict, g_variant_get_type_string (value), type_string); g_free (type_string); + g_variant_unref (value); goto out; } ret = value; -- 2.7.4