diff mbox series

Fix resource leak in extract_scripts

Message ID 20200405094442.10112-1-sbabic@denx.de
State Accepted
Headers show
Series Fix resource leak in extract_scripts | expand

Commit Message

Stefano Babic April 5, 2020, 9:44 a.m. UTC
Fix coverity #292217

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 core/installer.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/core/installer.c b/core/installer.c
index 879f3c1..1f6c862 100644
--- a/core/installer.c
+++ b/core/installer.c
@@ -139,6 +139,7 @@  static int extract_scripts(int fd, struct imglist *head, int fromfile)
 			if (fdin < 0) {
 				ERROR("Extracted script not found in %s: %s %d",
 					get_tmpdir(), script->extract_file, errno);
+				close(fdout);
 				return -ENOENT;
 			}