diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-07-09 13:28:44 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-07-09 13:28:44 +0000 |
commit | db8ed00b21241a21a0ffc6af2f78b417e6a0ec28 (patch) | |
tree | 6ca62037862adee2b848cbaeaff0b34a0641e901 /ACE/ace/OS_NS_unistd.cpp | |
parent | 219ad5008fb91b9408ac051f7a40d78f2b6cdb75 (diff) | |
download | ATCD-db8ed00b21241a21a0ffc6af2f78b417e6a0ec28.tar.gz |
Mon Jul 9 12:25:12 UTC 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/ace/OS_NS_unistd.cpp')
-rw-r--r-- | ACE/ace/OS_NS_unistd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ACE/ace/OS_NS_unistd.cpp b/ACE/ace/OS_NS_unistd.cpp index 4b63b55ec69..e13dac866ad 100644 --- a/ACE/ace/OS_NS_unistd.cpp +++ b/ACE/ace/OS_NS_unistd.cpp @@ -15,6 +15,7 @@ ACE_RCSID (ace, OS_NS_unistd, "$Id$") #include "ace/OS_Memory.h" #include "ace/OS_NS_Thread.h" #include "ace/Object_Manager_Base.h" +#include "ace/Auto_Ptr.h" #include "ace/os_include/sys/os_pstat.h" #include "ace/os_include/sys/os_sysctl.h" @@ -227,8 +228,9 @@ pid_t ACE_OS::fork_exec (ACE_TCHAR *argv[]) { # if defined (ACE_WIN32) - ACE_TCHAR *buf = 0; + ACE_TCHAR *buf = 0; + ACE_Auto_Basic_Array_Ptr<ACE_TCHAR> safe_ptr (buf); if (ACE_OS::argv_to_string (argv, buf) != -1) { PROCESS_INFORMATION process_info; @@ -266,10 +268,8 @@ ACE_OS::fork_exec (ACE_TCHAR *argv[]) ACE_OS::close (process_info.hThread); ACE_OS::close (process_info.hProcess); // Return new process id. - delete [] buf; return process_info.dwProcessId; } - delete [] buf; } // CreateProcess failed. |