diff options
author | bala <balanatarajan@users.noreply.github.com> | 2002-02-13 18:47:13 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2002-02-13 18:47:13 +0000 |
commit | 135c13bf3fa7d21f3159e821625b8348baa9ca0d (patch) | |
tree | b2cbf55d4f67f295d9c22d9b8a70e608fe29d6aa | |
parent | e7d42328f48fd9ba85f9216f1560709460dd35fa (diff) | |
download | ATCD-135c13bf3fa7d21f3159e821625b8348baa9ca0d.tar.gz |
ChangeLogTag: Wed Feb 13 12:45:06 2002 Balachandran Natarajan <bala@cs.wustl.edu>
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 6 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 6 | ||||
-rw-r--r-- | ace/Configuration.cpp | 9 | ||||
-rw-r--r-- | tests/Config_Test.cpp | 4 |
5 files changed, 27 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index e7677ed4934..a6b5095f25c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Feb 13 12:45:06 2002 Balachandran Natarajan <bala@cs.wustl.edu> + + * ace/Configuration.cpp: + * tests/Config_Test.cpp (iniCompare): Fixed memory leaks. Thanks + to Johnny willemson for providing the patches. + Wed Feb 13 11:46:54 2002 Nanbor Wang <nanbor@cs.wustl.edu> * XML/parser/parser/Makefile: Added a library (-lACEXML) to link diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index e7677ed4934..a6b5095f25c 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,9 @@ +Wed Feb 13 12:45:06 2002 Balachandran Natarajan <bala@cs.wustl.edu> + + * ace/Configuration.cpp: + * tests/Config_Test.cpp (iniCompare): Fixed memory leaks. Thanks + to Johnny willemson for providing the patches. + Wed Feb 13 11:46:54 2002 Nanbor Wang <nanbor@cs.wustl.edu> * XML/parser/parser/Makefile: Added a library (-lACEXML) to link diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index e7677ed4934..a6b5095f25c 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,9 @@ +Wed Feb 13 12:45:06 2002 Balachandran Natarajan <bala@cs.wustl.edu> + + * ace/Configuration.cpp: + * tests/Config_Test.cpp (iniCompare): Fixed memory leaks. Thanks + to Johnny willemson for providing the patches. + Wed Feb 13 11:46:54 2002 Nanbor Wang <nanbor@cs.wustl.edu> * XML/parser/parser/Makefile: Added a library (-lACEXML) to link diff --git a/ace/Configuration.cpp b/ace/Configuration.cpp index 80f14b2a154..02d1339617f 100644 --- a/ace/Configuration.cpp +++ b/ace/Configuration.cpp @@ -348,8 +348,8 @@ int ACE_Configuration::operator== (const ACE_Configuration& rhs) const } else if (valueType == BINARY) { - void* thisData; - void* rhsData; + void* thisData = 0; + void* rhsData = 0; u_int thisLength, rhsLength; if (nonconst_this->get_binary_value (thisSection, valueName.c_str (), @@ -383,6 +383,9 @@ int ACE_Configuration::operator== (const ACE_Configuration& rhs) const rc = (* (thisCharData + count) == * (rhsCharData + count)); } }// end if the length's match + + delete[] thisData; + delete[] rhsData; } // We should never have valueTypes of INVALID, therefore // we're not comparing them. How would we since we have @@ -768,7 +771,7 @@ ACE_Configuration_Win32Registry::get_string_value (const ACE_Configuration_Secti ACE_TCHAR *temp = 0; ACE_NEW_RETURN (temp, - ACE_TCHAR[buffer_length], + ACE_TCHAR[buffer_length], 0); ACE_Auto_Basic_Array_Ptr<ACE_TCHAR> buffer (temp); diff --git a/tests/Config_Test.cpp b/tests/Config_Test.cpp index d3e798fd65e..4f979354785 100644 --- a/tests/Config_Test.cpp +++ b/tests/Config_Test.cpp @@ -122,7 +122,7 @@ test (ACE_Configuration *config) if (data_out[j] != data[j]) return -11; - delete data_out; + delete [] data_out; // Test iteration. ACE_TString name; @@ -710,6 +710,8 @@ iniCompare (ACE_Configuration_Heap& fromFile, ACE_Configuration_Heap& original) ++ptr; } delete (char *)binary_data; + delete [] (char *)binary_data; + }// end successful binary read }// end if originalType was binary else |