]> 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:07:08 +0000 (13:07 +0400)
* os_dep.c (GC_register_data_segments): Call fclose(myexefile) on
return (only if OS2).

os_dep.c

index e6283ac4545aaf4c0e92780496af918a2bcb6e11..01e01ea62b48fff72845561c32f17b54e736b1ab 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 */