From 5643b2a3ea7a5c3454113cd80f5f07251d1c0a4b Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 17 May 2018 17:49:58 +0200 Subject: Correctly release request JSON object A JSON object coming from an AFB request is handled by the appfw. So, it release it once request has been executed. ActionExecOne also decrement the reference count of the json_object, so to make the count right it is needed to call a json_object_get here. Change-Id: I4c74a767e8e51e8b975ebe66c97f5b1f5b3aba05 Signed-off-by: Romain Forlot --- ctl-lib/ctl-action.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ctl-lib/ctl-action.c') diff --git a/ctl-lib/ctl-action.c b/ctl-lib/ctl-action.c index e0388e0..583ed5c 100644 --- a/ctl-lib/ctl-action.c +++ b/ctl-lib/ctl-action.c @@ -132,7 +132,7 @@ static void ActionDynRequest(AFB_ReqT request) { source.api = action->api; // provide request and execute the action - ActionExecOne(&source, action, queryJ); + ActionExecOne(&source, action, json_object_get(queryJ)); } #endif -- cgit 1.2.3-korg