[Sound-open-firmware] [PATCH] rmbox: Close opened files

Liam Girdwood liam.r.girdwood at linux.intel.com
Thu Mar 29 14:47:46 CEST 2018


From: Tomasz Lauda <tomasz.lauda at linux.intel.com>

Input and output files in trace_read function should be closed after using.

Signed-off-by: Tomasz Lauda <tomasz.lauda at linux.intel.com>
---
 rmbox/rmbox.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/rmbox/rmbox.c b/rmbox/rmbox.c
index 115be83..4df2ee1 100644
--- a/rmbox/rmbox.c
+++ b/rmbox/rmbox.c
@@ -232,6 +232,10 @@ trace:
 		addr += TRACE_BLOCK_SIZE;
 	}
 
+	fclose(in_fd);
+	if (out_fd)
+		fclose(out_fd);
+
 	return 0;
 }
 
-- 
2.14.1



More information about the Sound-open-firmware mailing list