PR gdb/7912:
[deliverable/binutils-gdb.git] / gdb / xml-support.c
index 7ace5b9880a4815cbf061d9b3268e93615abb0ec..b777814fb9f3d21bcd6cde6d6be16b2dcbb99d8a 100644 (file)
@@ -21,6 +21,7 @@
 #include "gdbcmd.h"
 #include "exceptions.h"
 #include "xml-support.h"
+#include "filestuff.h"
 
 #include "gdb_string.h"
 #include "safe-ctype.h"
@@ -1044,11 +1045,11 @@ xml_fetch_content_from_file (const char *filename, void *baton)
 
       if (fullname == NULL)
        malloc_failure (0);
-      file = fopen (fullname, FOPEN_RT);
+      file = gdb_fopen_cloexec (fullname, FOPEN_RT);
       xfree (fullname);
     }
   else
-    file = fopen (filename, FOPEN_RT);
+    file = gdb_fopen_cloexec (filename, FOPEN_RT);
 
   if (file == NULL)
     return NULL;
This page took 0.025356 seconds and 4 git commands to generate.