diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-04-03 00:19:41 -0700 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-04-03 10:19:22 -0700 |
commit | c723097e1238780420814a184349a9ca950e2557 (patch) | |
tree | 77962323ec9d14a603b82400bf726aff02644be6 /binding/afm-mediaplayer-binding.c | |
parent | e7901b351805a9c30ae32c1b1bdf7cfc2e918e73 (diff) |
binding: mediaplayer: correct g_object_unref on non-gobjectguppy_7.0.1guppy/7.0.17.0.1
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/afm-mediaplayer-binding.c')
-rw-r--r-- | binding/afm-mediaplayer-binding.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/binding/afm-mediaplayer-binding.c b/binding/afm-mediaplayer-binding.c index 98887c1..9eea30e 100644 --- a/binding/afm-mediaplayer-binding.c +++ b/binding/afm-mediaplayer-binding.c @@ -163,12 +163,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)); |