aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-04-02 12:17:09 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2019-04-02 12:17:09 +0200
commit7bfec93a539b1e3a4db37ca056b8da9f4190ecfd (patch)
treed52ad82d9dfc520c848f565251550e49cf28464c /src
parent4de99dea9074944525a2148a13f62d3952de4909 (diff)
Fix: api userdata pointer released
The json_object given to afb_req_success is released so and as it's the userdata or a subpart, we need to increment the json_object reference count. Change-Id: I9ee3fa5f613cd80c1f2374a545dec247c0a52cd8 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r--src/platform-info-binding.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platform-info-binding.c b/src/platform-info-binding.c
index c373d53..5e78fd9 100644
--- a/src/platform-info-binding.c
+++ b/src/platform-info-binding.c
@@ -56,7 +56,7 @@ void afv_get(afb_req_t req) {
return;
}
- afb_req_success(req, result, NULL);
+ afb_req_success(req, json_object_get(result), NULL);
}
void afv_set(afb_req_t req) {