r300g/tests: Added missing fclose for FILE resource.
authorSiavash Eliasi <siavashserver@gmail.com>
Mon, 10 Feb 2014 09:58:14 +0000 (13:28 +0330)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 28 Feb 2014 23:57:15 +0000 (15:57 -0800)
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c

index b4e30d8a8721d6e245bb08bd6a06d27b93607eab..239a76298fee9fcd3923a58c734bd8584719cd24 100644 (file)
@@ -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;
 }