summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-app-inf.c
diff options
context:
space:
mode:
authorKalev Lember <klember@redhat.com>2015-09-08 14:30:28 +0200
committerKalev Lember <klember@redhat.com>2015-09-08 14:32:23 +0200
commit6ef00b04680e3bfb8923158f7ffef3de8d9b09ef (patch)
tree0b21f7b95bc27223621ae657c2b04f20b78df877 /libappstream-glib/as-app-inf.c
parenta3d06c5cb6f85e963be74e8866e1c3bc71ee4990 (diff)
downloadappstream-glib-6ef00b04680e3bfb8923158f7ffef3de8d9b09ef.tar.gz
Use GLib's cleanup functions instead of libgsystem's
We still have a few types that don't support g_autoptr(), but very very close to having everything ported over. This also bumps gdk-pixbuf dep to 2.31.5 for the cleanup macro support.
Diffstat (limited to 'libappstream-glib/as-app-inf.c')
-rw-r--r--libappstream-glib/as-app-inf.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/libappstream-glib/as-app-inf.c b/libappstream-glib/as-app-inf.c
index 9389108..9515857 100644
--- a/libappstream-glib/as-app-inf.c
+++ b/libappstream-glib/as-app-inf.c
@@ -56,27 +56,27 @@ as_app_parse_inf_file (AsApp *app,
GError **error)
{
guint64 timestamp;
- _cleanup_error_free_ GError *error_local = NULL;
- _cleanup_free_ gchar *appstream_id = NULL;
- _cleanup_free_ gchar *catalog_basename = NULL;
- _cleanup_free_ gchar *class_guid = NULL;
- _cleanup_free_ gchar *class_guid_unsafe = NULL;
- _cleanup_free_ gchar *class = NULL;
- _cleanup_free_ gchar *comment = NULL;
- _cleanup_free_ gchar *filename_full = NULL;
- _cleanup_free_ gchar *firmware_basename = NULL;
- _cleanup_free_ gchar *guid = NULL;
- _cleanup_free_ gchar *provide_guid = NULL;
- _cleanup_free_ gchar *location_checksum = NULL;
- _cleanup_free_ gchar *name = NULL;
- _cleanup_free_ gchar *srcpkg = NULL;
- _cleanup_free_ gchar *vendor = NULL;
- _cleanup_free_ gchar *version = NULL;
- _cleanup_keyfile_unref_ GKeyFile *kf = NULL;
- _cleanup_object_unref_ AsIcon *icon = NULL;
- _cleanup_object_unref_ AsProvide *provide = NULL;
- _cleanup_object_unref_ AsRelease *release = NULL;
- _cleanup_strv_free_ gchar **source_keys = NULL;
+ g_autoptr(GError) error_local = NULL;
+ g_autofree gchar *appstream_id = NULL;
+ g_autofree gchar *catalog_basename = NULL;
+ g_autofree gchar *class_guid = NULL;
+ g_autofree gchar *class_guid_unsafe = NULL;
+ g_autofree gchar *class = NULL;
+ g_autofree gchar *comment = NULL;
+ g_autofree gchar *filename_full = NULL;
+ g_autofree gchar *firmware_basename = NULL;
+ g_autofree gchar *guid = NULL;
+ g_autofree gchar *provide_guid = NULL;
+ g_autofree gchar *location_checksum = NULL;
+ g_autofree gchar *name = NULL;
+ g_autofree gchar *srcpkg = NULL;
+ g_autofree gchar *vendor = NULL;
+ g_autofree gchar *version = NULL;
+ g_autoptr(GKeyFile) kf = NULL;
+ g_autoptr(AsIcon) icon = NULL;
+ g_autoptr(AsProvide) provide = NULL;
+ g_autoptr(AsRelease) release = NULL;
+ g_auto(GStrv) source_keys = NULL;
/* load file */
kf = g_key_file_new ();