Mesa (master): r300g/tests: Added missing fclose for FILE resource.

Kristian Høgsberg krh at kemper.freedesktop.org
Fri Feb 28 23:57:39 UTC 2014


Module: Mesa
Branch: master
Commit: 0fe8d71667b9ea4f4e115dce77f6f829e7681b8c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0fe8d71667b9ea4f4e115dce77f6f829e7681b8c

Author: Siavash Eliasi <siavashserver at gmail.com>
Date:   Mon Feb 10 13:46:14 2014 +0330

r300g/tests: Added missing fclose for FILE resource.

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>

---

 src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c b/src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c
index b4e30d8..239a762 100644
--- a/src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c
+++ b/src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c
@@ -557,6 +557,7 @@ unsigned load_program(
 		if (last_char && last_char != '\n') {
 			fprintf(stderr, "Error line cannot be longer than 100 "
 				"characters:\n%s\n", line);
+			fclose(file);
 			return 0;
 		}
 
@@ -605,5 +606,7 @@ unsigned load_program(
 		// XXX: Parse immediates from the file.
 		add_instruction(c, test->input[i]);
 	}
+
+	fclose(file);
 	return 1;
 }




More information about the mesa-commit mailing list