From 8f111cf5e1d047220e10d180ffc788d0b62e1142 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Wed, 5 Jun 2019 14:48:18 -0700 Subject: 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 --- binding/afm-mediaplayer-binding.c | 1 + 1 file changed, 1 insertion(+) (limited to 'binding') 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; -- cgit 1.2.3-korg