]> granicus.if.org Git - gc/commitdiff
Fix file descriptor resource leak in GC_register_data_segments (OS/2)
authorIvan Maidanski <ivmai@mail.ru>
Fri, 13 Jun 2014 14:22:30 +0000 (18:22 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 15 Jun 2014 09:12:05 +0000 (13:12 +0400)
* os_dep.c (GC_register_data_segments): Call fclose(myexefile) on
return (only if OS2).

os_dep.c

index 08c501df3c0e9f87a597dcf193c26a947feaccbd..bbae09e8a8e16a37f81008bcf720f2ef7d03f7a0 100644 (file)
--- a/os_dep.c
+++ b/os_dep.c
@@ -1538,6 +1538,7 @@ void GC_register_data_segments(void)
       GC_add_roots_inner((ptr_t)O32_BASE(seg),
                          (ptr_t)(O32_BASE(seg)+O32_SIZE(seg)), FALSE);
     }
+    (void)fclose(myexefile);
 }
 
 # else /* !OS2 */