diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2019-04-02 12:17:09 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2019-04-02 12:17:09 +0200 |
commit | 7bfec93a539b1e3a4db37ca056b8da9f4190ecfd (patch) | |
tree | d52ad82d9dfc520c848f565251550e49cf28464c /src | |
parent | 4de99dea9074944525a2148a13f62d3952de4909 (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.c | 2 |
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) { |