diff mbox series

[15/17] sandbox: Silence coverity warning in state_read_file()

Message ID 20210508220021.1778080-16-sjg@chromium.org
State Changes Requested
Delegated to: Tom Rini
Headers show
Series Fix various coverity warnings | expand

Commit Message

Simon Glass May 8, 2021, 10 p.m. UTC
In this case the value seems save to pass to os_free(). Silence the
warning.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Coverity (CID: 165109)
---

 arch/sandbox/cpu/state.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c
index f63cfd38ee4..4cd788fb22c 100644
--- a/arch/sandbox/cpu/state.c
+++ b/arch/sandbox/cpu/state.c
@@ -78,6 +78,7 @@  static int state_read_file(struct sandbox_state *state, const char *fname)
 err_read:
 	os_close(fd);
 err_open:
+	/* coverity[TAINTED_SCALAR] */
 	os_free(state->state_fdt);
 	state->state_fdt = NULL;