Merge "libdexfile: Fix inconsequential resource leak in test"
diff --git a/libdexfile/external/dex_file_ext_c_test.c b/libdexfile/external/dex_file_ext_c_test.c
index ad0737a..85cd46e 100644
--- a/libdexfile/external/dex_file_ext_c_test.c
+++ b/libdexfile/external/dex_file_ext_c_test.c
@@ -36,6 +36,7 @@
   }
   if (fprintf(output_fd, gtest_output_xml) != sizeof(gtest_output_xml) - 1) {
     fprintf(stderr, "Failed to write %s: %s\n", gtest_output_path, strerror(errno));
+    fclose(output_fd);
     return 1;
   }
   if (fclose(output_fd) != 0) {