summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-11-06 17:05:38 (EST)
committer Patrick McDermott <pj@pehjota.net>2017-11-06 17:05:38 (EST)
commit40431b0ea9700b913c03a3f3e8d86b76d7a7c2bb (patch)
treea544a8823a3ab6b056c74543f009ae0da7c777e1 /src/config
parentbe7be15b105f4b301c9d4e07e78be2447b48ef52 (diff)
downloadmarquee-40431b0ea9700b913c03a3f3e8d86b76d7a7c2bb.zip
marquee-40431b0ea9700b913c03a3f3e8d86b76d7a7c2bb.tar.gz
marquee-40431b0ea9700b913c03a3f3e8d86b76d7a7c2bb.tar.bz2
mq_config_deref(): New function
Diffstat (limited to 'src/config')
-rw-r--r--src/config/config.c10
-rw-r--r--src/config/config.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/src/config/config.c b/src/config/config.c
index fbaf7d8..4db1134 100644
--- a/src/config/config.c
+++ b/src/config/config.c
@@ -198,6 +198,16 @@ mq_config_new(const gchar *profile, MqConfigProfile profile_type)
return config;
}
+void
+mq_config_deref(MqConfig *config)
+{
+ g_free(config->profile);
+ g_free(config->file_name);
+ g_key_file_unref(config->key_file);
+ g_hash_table_unref(config->types_and_cbs);
+ g_free(config);
+}
+
gboolean
mq_config_load(MqConfig *config)
{
diff --git a/src/config/config.h b/src/config/config.h
index 17859de..2285e1c 100644
--- a/src/config/config.h
+++ b/src/config/config.h
@@ -45,6 +45,9 @@ typedef void (*MqConfigStringCallback)(MqConfig *,
MqConfig *
mq_config_new(const gchar *profile, MqConfigProfile profile_type);
+void
+mq_config_deref(MqConfig *config);
+
gboolean
mq_config_load(MqConfig *config);