diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-06-05 14:48:18 -0700 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-06-05 15:15:06 -0700 |
commit | 8f111cf5e1d047220e10d180ffc788d0b62e1142 (patch) | |
tree | 7588a1de2107d4a52e01d09b485bd239c45e7a8f /binding/afm-mediaplayer-binding.c | |
parent | 4e8830e73267d9b62f167cb24ae5d650038be956 (diff) |
binding: mediaplayer: fix refcount imbalance
JSON response that was passed to onevent callback was being
resent in an event without refcount being increased.
Resulting assertion failure:
json_object_put: Assertion `jso->_ref_count > 0' failed.
Bug-AGL: SPEC-2488
Change-Id: I40cf36f0e7e96c5974bd6b6c49b5044bbe199b77
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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/binding/afm-mediaplayer-binding.c b/binding/afm-mediaplayer-binding.c index b25418c..fe6e6c6 100644 --- a/binding/afm-mediaplayer-binding.c +++ b/binding/afm-mediaplayer-binding.c @@ -1020,6 +1020,7 @@ static void onevent(afb_api_t api, const char *event, struct json_object *object pthread_mutex_unlock(&mutex); + json_object_get(object); afb_event_push(metadata_event, object); return; |