From: Matt Ranostay Date: Thu, 28 Nov 2019 06:56:30 +0000 (-0800) Subject: binding: pbap: add missing return after afb_req_fail call X-Git-Tag: 8.0.4^0 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fheads%2Fhalibut;p=apps%2Fagl-service-bluetooth-pbap.git binding: pbap: add missing return after afb_req_fail call To avoid calling afb_req_success after failure return after the afb_req_fail call in contacts verb. Bug-AGL: SPEC-2630 Change-Id: I2d521d7c04a4be7dd49e8a63cf1ac267de636de8 Signed-off-by: Matt Ranostay --- diff --git a/binding/bluetooth-pbap-binding.c b/binding/bluetooth-pbap-binding.c index e2f5c55..2ed2fd1 100644 --- a/binding/bluetooth-pbap-binding.c +++ b/binding/bluetooth-pbap-binding.c @@ -370,6 +370,7 @@ void contacts(afb_req_t request) jresp = json_tokener_parse(cached); } else { afb_req_fail(request, "no imported contacts", NULL); + return; } afb_req_success(request, jresp, "contacts");