This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix memory leak in std::moneypunct
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Sun, 25 Jan 2004 23:36:03 +0100
- Subject: Re: [PATCH] Fix memory leak in std::moneypunct
- References: <jeisizr7uw.fsf@sykes.suse.de>
Andreas Schwab wrote:
This fixes a memory leak in std::moneypunct, causing
22_locale/locale/cons/12352.cc to crash when running in a non-trivial
locale. Tested on ia64-linux. OK for 3.4 and 3.5?
Ah! So you found it!
I didn't remember that monetary_members.cc also contains memory
allocations wrapped in try/catch... and the failure can be reproduced
only with some glibcs.
The patch is ok for 3.4 and 3.5 of course and the try/catch block itself
should be added to 3.3 too since we have already patched all the other
possible causes of memory leaks there too... Are you willing to do that?
Paolo.