g_key_file_get_string_list: don't leak the pieces on error
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 14 Dec 2011 16:46:56 +0000 (16:46 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 14 Dec 2011 18:09:48 +0000 (18:09 +0000)
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666113
Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
glib/gkeyfile.c

index e8eb861..713721f 100644 (file)
@@ -1970,6 +1970,7 @@ g_key_file_get_string_list (GKeyFile     *key_file,
       else
         g_propagate_error (error, key_file_error);
 
+      g_slist_free_full (pieces, g_free);
       return NULL;
     }