diff options
author | Mohammed Sadiq <sadiq@sadiqpk.org> | 2017-06-17 07:20:28 +0530 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-06-19 11:25:01 +0200 |
commit | ed22ca8c83df7300d4f27cb5f7c3fe02dd183cb9 (patch) | |
tree | 930c41359736ae1f4b35d7a595fcd8e82b258897 | |
parent | f4f9389398259f65fea08d2facb8f885d1350cf1 (diff) | |
download | network-manager-applet-ed22ca8c83df7300d4f27cb5f7c3fe02dd183cb9.tar.gz |
cert-chooser-button: fix memory leak
Fixes: 2644d631afd072f66878799e75c5aa1947510c7a
https://bugzilla.gnome.org/show_bug.cgi?id=783880
-rw-r--r-- | src/libnma/nma-cert-chooser-button.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libnma/nma-cert-chooser-button.c b/src/libnma/nma-cert-chooser-button.c index f7e4444f..b87ae575 100644 --- a/src/libnma/nma-cert-chooser-button.c +++ b/src/libnma/nma-cert-chooser-button.c @@ -61,19 +61,22 @@ static gboolean is_this_a_slot_nobody_loves (GckSlot *slot) { GckSlotInfo *slot_info; + gboolean ret_value = FALSE; slot_info = gck_slot_get_info (slot); /* The p11-kit CA trusts do use their filesystem paths for description. */ if (g_str_has_prefix (slot_info->slot_description, "/")) - return TRUE; + ret_value = TRUE; if ( strcmp (slot_info->slot_description, "SSH Keys") == 0 || strcmp (slot_info->slot_description, "Secret Store") == 0 || strcmp (slot_info->slot_description, "User Key Storage") == 0) - return TRUE; + ret_value = TRUE; - return FALSE; + gck_slot_info_free (slot_info); + + return ret_value; } static void |