diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-15 10:11:03 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-12-15 10:11:03 +0000 |
commit | b1fc8ef135b900872d46ae829c4793a6019792dd (patch) | |
tree | a8e928e2bb1d296c80995e2b265c5b9ca0154da2 /libstdc++-v3/config/locale | |
parent | b92e2e4393509fe1bed60ef7db58013d3e8c9239 (diff) | |
download | gcc-b1fc8ef135b900872d46ae829c4793a6019792dd.tar.gz |
2005-12-15 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/25421
* config/locale/gnu/c_locale.cc (_S_destroy_c_locale): Check
for null argument.
* testsuite/22_locale/facet/25421.cc: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108565 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/config/locale')
-rw-r--r-- | libstdc++-v3/config/locale/gnu/c_locale.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/config/locale/gnu/c_locale.cc b/libstdc++-v3/config/locale/gnu/c_locale.cc index 493ad4b2ca3..7a45a6e9fda 100644 --- a/libstdc++-v3/config/locale/gnu/c_locale.cc +++ b/libstdc++-v3/config/locale/gnu/c_locale.cc @@ -100,7 +100,7 @@ namespace std void locale::facet::_S_destroy_c_locale(__c_locale& __cloc) { - if (_S_get_c_locale() != __cloc) + if (__cloc && _S_get_c_locale() != __cloc) __freelocale(__cloc); } |