diff options
author | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-06-02 00:48:52 +0200 |
---|---|---|
committer | Jonathan Aillet <jonathan.aillet@iot.bzh> | 2018-06-06 16:49:07 +0000 |
commit | 3ee6068012b9afc958598385fe17587ef8fdcefc (patch) | |
tree | 822d9874e2e5ade11f7f2ed9072bcfe2f0546b8b | |
parent | 67c6759d5bd0f11289fff1bdd11a8dc28bf82ec7 (diff) |
Correct a segfault when using ping verb
When 'ping' verb is called, be sure that we won't generate a segfault
by using 'json_object_get' before responding.
Bug-AGL: SPEC-1405
Change-Id: I22fb8e1e492a33e7310d009998fd3c72383e702d
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
-rw-r--r-- | alsa-binding/Alsa-ApiHat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/alsa-binding/Alsa-ApiHat.c b/alsa-binding/Alsa-ApiHat.c index a5220e2..7c5f29e 100644 --- a/alsa-binding/Alsa-ApiHat.c +++ b/alsa-binding/Alsa-ApiHat.c @@ -32,7 +32,7 @@ STATIC void pingtest(struct afb_req request) { json_object *query = afb_req_json(request); - afb_req_success(request, query, NULL); + afb_req_success(request, json_object_get(query), NULL); } /* |