[network-manager-applet] applet: fix small leak
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet] applet: fix small leak
- Date: Fri, 19 Apr 2013 13:23:53 +0000 (UTC)
commit 9e759037bdb8dd5188a2380cc9c4d6a0fc7b0fbe
Author: Dan Winship <danw gnome org>
Date: Fri Apr 19 09:22:20 2013 -0400
applet: fix small leak
When libsecret doesn't return the expected data, we still have to free
the parts that it did return.
https://bugzilla.gnome.org/show_bug.cgi?id=697566
src/applet-agent.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/applet-agent.c b/src/applet-agent.c
index 731dc7b..1a134f2 100644
--- a/src/applet-agent.c
+++ b/src/applet-agent.c
@@ -364,8 +364,11 @@ keyring_find_secrets_cb (GObject *source,
if (secret) {
attributes = secret_item_get_attributes (item);
key_name = g_hash_table_lookup (attributes, KEYRING_SK_TAG);
- if (!key_name)
+ if (!key_name) {
+ g_hash_table_unref (attributes);
+ secret_value_unref (secret);
continue;
+ }
g_hash_table_insert (secrets, g_strdup (key_name),
string_to_gvalue (secret_value_get (secret, NULL)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]