]> git.0d.be Git - empathy.git/commitdiff
theme-adium: free the result of g_strsplit with g_strfreev
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 12 Sep 2012 13:06:28 +0000 (15:06 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Thu, 13 Sep 2012 08:15:46 +0000 (10:15 +0200)
Freeing with g_free() doesn't free the content of the array.

https://bugzilla.gnome.org/show_bug.cgi?id=683864

libempathy-gtk/empathy-theme-adium.c

index 194273d923737e034f1d05e165fdbe9c6d87174a..2e243c46d7a3d18539ca37b5be48afb7e83a8ae3 100644 (file)
@@ -1763,20 +1763,17 @@ empathy_adium_path_is_valid (const gchar *path)
   /* The directory has to be *.AdiumMessageStyle per the Adium spec */
   tmp = g_strsplit (path, "/", 0);
   if (tmp == NULL)
-    {
-      g_free (tmp);
-      return FALSE;
-    }
+    return FALSE;
 
   dir = tmp[g_strv_length (tmp) - 1];
 
   if (!g_str_has_suffix (dir, ".AdiumMessageStyle"))
     {
-      g_free (tmp);
+      g_strfreev (tmp);
       return FALSE;
     }
 
-  g_free (tmp);
+  g_strfreev (tmp);
 
   /* The theme is not valid if there is no Info.plist */
   file = g_build_filename (path, "Contents", "Info.plist",