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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user