[krb5-auth-dialog: 5/14] applet: Use g_list_free_full ()




commit ff33fc21b1722c5375479f73707bdd7cbae133c2
Author: Guido Günther <agx sigxcpu org>
Date:   Mon Jan 4 18:20:28 2021 +0100

    applet: Use g_list_free_full ()
    
    Less code and avoids a warning due to GFunc and g_free
    having different signatures.

 src/ka-applet.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/ka-applet.c b/src/ka-applet.c
index 75c6303..921ff9a 100644
--- a/src/ka-applet.c
+++ b/src/ka-applet.c
@@ -1164,8 +1164,7 @@ ka_ns_check_persistence (KaApplet *self)
                 self->priv->ns_persistence = TRUE;
                 KA_DEBUG ("Notification server supports persistence.");
             }
-            g_list_foreach (caps, (GFunc) g_free, NULL);
-            g_list_free (caps);
+            g_list_free_full (caps, (GDestroyNotify)g_free);
         }
         /* During session start we have to wait until the shell is fully up
          * to reliably detect the persistence property (#642666) */


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