[network-manager-applet] cert-chooser-button: fix memory leak



commit ed22ca8c83df7300d4f27cb5f7c3fe02dd183cb9
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Sat Jun 17 07:20:28 2017 +0530

    cert-chooser-button: fix memory leak
    
    Fixes: 2644d631afd072f66878799e75c5aa1947510c7a
    
    https://bugzilla.gnome.org/show_bug.cgi?id=783880

 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 f7e4444..b87ae57 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]