[gnome-keyring] gkm-xdg-assertion: Fix leak in factory_create_assertion()
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] gkm-xdg-assertion: Fix leak in factory_create_assertion()
- Date: Tue, 14 Oct 2014 16:20:41 +0000 (UTC)
commit 670fe30c2dfe7accc738c8def6c1ccf047c944b6
Author: Christophe Fergeau <cfergeau redhat com>
Date: Wed Oct 1 23:09:03 2014 +0200
gkm-xdg-assertion: Fix leak in factory_create_assertion()
'purpose' and 'peer' were allocated through gkm_attributes_find_string()
and must thus be freed after use.
https://bugzilla.gnome.org/show_bug.cgi?id=738508
pkcs11/xdg-store/gkm-xdg-assertion.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/pkcs11/xdg-store/gkm-xdg-assertion.c b/pkcs11/xdg-store/gkm-xdg-assertion.c
index df4b678..f655f71 100644
--- a/pkcs11/xdg-store/gkm-xdg-assertion.c
+++ b/pkcs11/xdg-store/gkm-xdg-assertion.c
@@ -173,6 +173,8 @@ factory_create_assertion (GkmSession *session, GkmTransaction *transaction,
"purpose", purpose,
"peer", peer,
NULL);
+ g_free (purpose);
+ g_free (peer);
/* Add the assertion to the trust object */
if (!gkm_transaction_get_failed (transaction)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]