aboutsummaryrefslogtreecommitdiffstats
path: root/ctl-lib/ctl-action.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-05-17 17:49:58 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-05-17 17:58:26 +0200
commit2b6c0eb7d0df2bf818c439ee51b144a5e8d3216a (patch)
treeca5ab82428b992e15725f43c1216f201aa831a7d /ctl-lib/ctl-action.c
parentc3a60d631a6168b6f0d69daa6659c566eeb2b643 (diff)
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 <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-lib/ctl-action.c')
-rw-r--r--ctl-lib/ctl-action.c2
1 files changed, 1 insertions, 1 deletions
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