[glib/keyfile-portal-fixes] fixup! portal: Add a getter for dconf access



commit 5b356cd47eb9665031409f0274eb9acd59cf6204
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jul 15 07:49:30 2019 -0400

    fixup! portal: Add a getter for dconf access
    
    Don't strcmp a NULL string, but free it if its not NULL.

 gio/gportalsupport.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gio/gportalsupport.c b/gio/gportalsupport.c
index b9be354ec..b0a94b360 100644
--- a/gio/gportalsupport.c
+++ b/gio/gportalsupport.c
@@ -57,8 +57,12 @@ read_flatpak_info (void)
             }
 
           dconf_policy = g_key_file_get_string (keyfile, "Session Bus Policy", "ca.desrt.dconf", NULL);
-          if (strcmp (dconf_policy, "talk") == 0)
-            dconf_access = TRUE;
+          if (dconf_policy)
+            {
+              if (strcmp (dconf_policy, "talk") == 0)
+                dconf_access = TRUE;
+              g_free (dconf_policy);
+            }
         }
 
       g_key_file_unref (keyfile);


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