* win32-nat.c (win32_create_inferior): Restore code calling
authorPierre Muller <muller@sourceware.org>
Mon, 14 Jan 2008 08:01:15 +0000 (08:01 +0000)
committerPierre Muller <muller@sourceware.org>
Mon, 14 Jan 2008 08:01:15 +0000 (08:01 +0000)
CloseHandle on ProcessInformation structure.

gdb/ChangeLog
gdb/win32-nat.c
gdb/windows-nat.c

index 2e9e162..adf0fae 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-14  Pierre Muller  <muller@ics.u-strasbg.fr>
+
+       * win32-nat.c (win32_create_inferior): Restore code calling
+       CloseHandle on ProcessInformation structure.
+
 2008-01-13  Nick Hudson  <nick.hudson@dsl.pipex.com>
 
        * configure.ac: Check for void * as 3 argument of ptrace.
index 40733a8..e8c2bed 100644 (file)
@@ -1880,6 +1880,9 @@ win32_create_inferior (char *exec_file, char *allargs, char **in_env,
     error (_("Error creating process %s, (error %d)."),
           exec_file, (unsigned) GetLastError ());
 
+  CloseHandle (pi.hThread);
+  CloseHandle (pi.hProcess);
+
   if (useshell && shell[0] != '\0')
     saw_create = -1;
   else
index 40733a8..e8c2bed 100644 (file)
@@ -1880,6 +1880,9 @@ win32_create_inferior (char *exec_file, char *allargs, char **in_env,
     error (_("Error creating process %s, (error %d)."),
           exec_file, (unsigned) GetLastError ());
 
+  CloseHandle (pi.hThread);
+  CloseHandle (pi.hProcess);
+
   if (useshell && shell[0] != '\0')
     saw_create = -1;
   else