CEC: fix use-after-free in hdmicec_close

Fields of 'ctx' are accessed just after it is freed.

Test: manual
Change-Id: I7c3786db9ae618d84149874c72662e4d105765b4
Signed-off-by: Oleg Lyovin <ovlevin@salutedevices.com>
This commit is contained in:
Oleg Lyovin
2024-09-17 15:33:21 +03:00
committed by Konsta
parent 9fdacb0960
commit fb83928d5a

View File

@@ -471,9 +471,6 @@ static int hdmicec_close(struct hdmi_cec_device *dev)
if (ctx->exit_fd > 0)
close(ctx->exit_fd);
free(ctx);
ctx->cec_enabled = false;
ctx->cec_control_enabled = false;
return 0;
}