From 1443e88be2b685eec831d66e43a8bcd8a8b32e3d Mon Sep 17 00:00:00 2001 From: Clément Bénier Date: Mon, 8 Apr 2019 16:05:03 +0200 Subject: iiodevices-binding: Use-after-free fixed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - call afb req fail before free client Change-Id: I8e5157a6ede435541bbfe0f05e3db4dfd1f37dd9 Signed-off-by: Clément Bénier --- binding/iiodevices-binding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'binding') diff --git a/binding/iiodevices-binding.c b/binding/iiodevices-binding.c index 61e43ca..b5a7588 100644 --- a/binding/iiodevices-binding.c +++ b/binding/iiodevices-binding.c @@ -550,8 +550,8 @@ static void subscribe(struct afb_req request) client = add_new_client(&iio_infos[i], iioelts, u_period); init_dev(client); if(!client->dev) { - deinit_client_sub(client); afb_req_fail_f(request, "failed", "No %s device found", client->infos->dev_name); + deinit_client_sub(client); return; } init_channel(client, iioelts); -- cgit 1.2.3-korg