From 3ee6068012b9afc958598385fe17587ef8fdcefc Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Sat, 2 Jun 2018 00:48:52 +0200 Subject: 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 --- alsa-binding/Alsa-ApiHat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } /* -- cgit 1.2.3-korg