[Bug libstdc++/12540] Memory leak in locale::locale(const char*)
cvs-commit at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Oct 16 17:24:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12540
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-10-16 17:24 -------
Subject: Bug 12540
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: paolo@gcc.gnu.org 2003-10-16 17:24:07
Modified files:
libstdc++-v3 : ChangeLog
libstdc++-v3/src: locale.cc
libstdc++-v3/config/locale/gnu: monetary_members.cc
Log message:
2003-10-16 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/12540
* config/locale/gnu/monetary_members.cc
(moneypunct<wchar_t, true/false>::_M_initialize_moneypunct):
Don't leak memory if new throws.
* src/locale.cc (locale::locale(const char*)): In order not
to leak memory in case new throws, use a basic_string type
for __res too and avoid strdup.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2015&r2=1.2016
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/src/locale.cc.diff?cvsroot=gcc&r1=1.97&r2=1.98
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/config/locale/gnu/monetary_members.cc.diff?cvsroot=gcc&r1=1.11&r2=1.12
More information about the Gcc-bugs
mailing list