From d5fe72c210372d3d81aefe08b35ef7dceade7941 Mon Sep 17 00:00:00 2001 From: Ossama Othman Date: Tue, 18 Oct 2005 16:55:06 +0000 Subject: ChangeLogTag:Tue Oct 18 09:53:29 2005 Ossama Othman --- ChangeLog | 8 ++++++++ ace/Argv_Type_Converter.cpp | 12 ++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index a009f19ae9e..62d7d015dd2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Oct 18 09:53:29 2005 Ossama Othman + + From Mickael P. Golovin + * ace/Argv_Type_Converter.cpp: + + Fixed strdup()/operator delete() mismatches. Strings allocated + by strdup() should be deallocated using free(). + Mon Oct 17 22:05:37 2005 Olli Savia * ace/TTY_IO.cpp: diff --git a/ace/Argv_Type_Converter.cpp b/ace/Argv_Type_Converter.cpp index ee23eeacada..05bf5aa657f 100644 --- a/ace/Argv_Type_Converter.cpp +++ b/ace/Argv_Type_Converter.cpp @@ -14,7 +14,7 @@ ACE_RCSID (ace, #include "ace/OS_Errno.h" #if defined (ACE_USES_WCHAR) -ACE_Argv_Type_Converter::ACE_Argv_Type_Converter(int &argc, wchar_t** argv) +ACE_Argv_Type_Converter::ACE_Argv_Type_Converter (int &argc, wchar_t** argv) : saved_argc_ (argc) , char_argv_ (0) , wchar_argv_ (argv) @@ -34,7 +34,7 @@ ACE_Argv_Type_Converter::ACE_Argv_Type_Converter(int &argc, wchar_t** argv) #endif // ACE_USES_WCHAR -ACE_Argv_Type_Converter::ACE_Argv_Type_Converter(int &argc, char** argv) +ACE_Argv_Type_Converter::ACE_Argv_Type_Converter (int &argc, char** argv) : saved_argc_(argc) , char_argv_(argv) #if defined (ACE_USES_WCHAR) @@ -70,7 +70,7 @@ ACE_Argv_Type_Converter::~ACE_Argv_Type_Converter (void) } for (int i = 0; i < this->before_pass_argc_; ++i) { - delete [] this->char_argv_[i]; + ACE_OS::free (this->char_argv_[i]); } delete [] this->char_argv_; } @@ -82,7 +82,7 @@ ACE_Argv_Type_Converter::~ACE_Argv_Type_Converter (void) } for (int i = 0; i < this->before_pass_argc_; ++i) { - delete [] this->wchar_argv_[i]; + ACE_OS::free (this->wchar_argv_[i]); } delete [] this->wchar_argv_; } @@ -188,12 +188,12 @@ ACE_Argv_Type_Converter::cleanup (void) // Check whether it's ours to delete. if (original_type_ == 1) { - delete [] this->char_argv_[i]; + ACE_OS::free (this->char_argv_[i]); this->char_argv_[i] = 0; } else { - delete [] this->wchar_argv_[i]; + ACE_OS::free (this->wchar_argv_[i]); this->wchar_argv_[i] = 0; } } -- cgit v1.2.1