summaryrefslogtreecommitdiffstats
path: root/binding
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2019-04-03 00:19:41 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2019-04-03 10:53:36 -0700
commit2da918bb09cb6f5bc50e551fdf4ee1e963a7be0b (patch)
tree04424aa3244e7313bc4c6b1b807336fcf6053d9b /binding
parentd1936aab14f1464f29e162d832d5d6cfc9d61cff (diff)
binding: mediaplayer: correct g_object_unref on non-gobject
Calling g_object_unref on gchar* is incorrect since it isn't an gobject, and thus g_free should be used instead. Change-Id: I5a982a4f083e2b7de340deaa26be99fb6caf63de Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding')
-rw-r--r--binding/afm-mediaplayer-binding.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/binding/afm-mediaplayer-binding.c b/binding/afm-mediaplayer-binding.c
index 233ccdc..5b49694 100644
--- a/binding/afm-mediaplayer-binding.c
+++ b/binding/afm-mediaplayer-binding.c
@@ -193,12 +193,11 @@ static gboolean populate_from_json(struct playlist_item *item, json_object *jdic
ret = json_object_object_get_ex(jdict, "type", &val);
if (!ret) {
- g_object_unref(item->media_path);
+ g_free(item->media_path);
return ret;
}
item->media_type = g_strdup(json_object_get_string(val));
-
ret = json_object_object_get_ex(jdict, "title", &val);
if (ret) {
item->title = g_strdup(json_object_get_string(val));