summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2018-06-02 00:48:52 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2018-06-14 16:02:58 +0200
commitd8064270ced05c7a28463120f21b7b2a29497772 (patch)
tree5d9e383f35eab7009f796bba614a3ba5c8734530
parentfe50b1e24283d14f9d516c1885819b2f520e3647 (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.c2
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);
}
/*