[committed] nvptx/mkoffload.c: Add missing fclose

Message ID 624c8f4f-318f-cbc9-ecc9-89a7dc3d417b@mentor.com
State New
Headers show
Series
  • [committed] nvptx/mkoffload.c: Add missing fclose
Related show

Commit Message

Tobias Burnus Oct. 13, 2020, 10:28 a.m.
When looking at nvptx/mkoffload.c, I spotted a missing fclose.

Committed as obvious.

Tobias

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter

Patch

commit 35103c6d8e3ee24a2497888bb1f7ef37327ace2b
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Tue Oct 13 11:54:26 2020 +0200

    nvptx/mkoffload.c: Add missing fclose
    
    gcc/ChangeLog:
    
            * config/nvptx/mkoffload.c (main): Add missing fclose (in).

diff --git a/gcc/config/nvptx/mkoffload.c b/gcc/config/nvptx/mkoffload.c
index 4fecb2b9cfe..7c43e617dcf 100644
--- a/gcc/config/nvptx/mkoffload.c
+++ b/gcc/config/nvptx/mkoffload.c
@@ -589,16 +589,17 @@  main (int argc, char **argv)
       xputenv (concat ("COMPILER_PATH=", cpath, NULL));
       xputenv (concat ("LIBRARY_PATH=", lpath, NULL));
 
       in = fopen (ptx_name, "r");
       if (!in)
 	fatal_error (input_location, "cannot open intermediate ptx file");
 
       process (in, out);
+      fclose (in);
     }
 
   fclose (out);
 
   compile_native (ptx_cfile_name, outname, collect_gcc, fPIC, fpic);
 
   return 0;
 }