You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by Gerrit Bruchhäuser <gb...@nero.com> on 2007/04/23 16:56:44 UTC
[PATCH] delete vs. delete[]
Dear Log4Cxx dev group,
Valgrind found a "delete vs delete[]" mismatch which I have fixed below.
Please could you apply the down lited patch in the next release?
---
--- log4cxx-0.9.7/src/stringtokenizer.cpp 2004-05-10 14:38:08.000000000
+0200
+++ log4cxx-0.9.7.gb/src/stringtokenizer.cpp 2007-04-23 16:00:46.000000000
+0200
@@ -39,7 +39,7 @@
StringTokenizer::~StringTokenizer()
{
- delete this->str;
+ delete[] this->str;
}
bool StringTokenizer::hasMoreTokens() const
---
Thanks,
Gerrit Bruchhaeuser
SD "Entertainment & Services"
Phone +49 7248 928 - 0
Fax +49 7248 928 - 499
E-Mail gbruchhaeuser@nero.com
http://www.nero.com
NERO - BECAUSE TECHNOLOGY COUNTS
*********************************************************
Nero AG
Im Stoeckmaedle 13-15
76307 Karlsbad
Germany
Vorstand: Richard Lesser (CEO), Kevin Dillon (CFO)
Aufsichtsratvorsitzender/ chairman of the supervisory board: Jim Corbett
Amtsgericht Mannheim HRB 362519
*********************************************************
This e-mail may contain confidential and/or privileged
information. If you are not the intended recipient (or have
received this e-mail in error) please notify the sender
immediately and destroy this e-mail.
Any unauthorised copying, disclosure or distribution of the
material in this e-mail is strictly forbidden.
*********************************************************
Re: [PATCH] delete vs. delete[]
Posted by Curt Arnold <ca...@apache.org>.
On Apr 23, 2007, at 9:56 AM, Gerrit Bruchhäuser wrote:
> Dear Log4Cxx dev group,
>
> Valgrind found a "delete vs delete[]" mismatch which I have fixed
> below.
> Please could you apply the down lited patch in the next release?
>
> ---
> --- log4cxx-0.9.7/src/stringtokenizer.cpp 2004-05-10
> 14:38:08.000000000
> +0200
> +++ log4cxx-0.9.7.gb/src/stringtokenizer.cpp 2007-04-23
> 16:00:46.000000000
> +0200
> @@ -39,7 +39,7 @@
>
Use of log4cxx 0.9.7 is discouraged and unsupported. There are many
significant bugs in the code that have been resolved in the SVN and
the current code is substantially different than the 0.9.7 code, so
bug reports on 0.9.7 do not typically add any value to the project.
The project is long overdue for a release, but using any snapshot of
log4cxx is much better than using 0.9.7.