This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] Fix libstdc++/38067


Hi,

tested x86_64-linux, committed to mainline.

Paolo.

///////////////////
2008-11-10  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/38067
	* config/locale/gnu/monetary_members.cc (moneypunct<>::
	_M_initialize_moneypunct(__c_locale, const char*)): Use correct vector
	delete for __wcs_ps and __wcs_ns.

Index: config/locale/gnu/monetary_members.cc
===================================================================
*** config/locale/gnu/monetary_members.cc	(revision 141714)
--- config/locale/gnu/monetary_members.cc	(working copy)
***************
*** 1,6 ****
  // std::moneypunct implementation details, GNU version -*- C++ -*-
  
! // Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
--- 1,7 ----
  // std::moneypunct implementation details, GNU version -*- C++ -*-
  
! // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
! // Free Software Foundation, Inc.
  //
  // This file is part of the GNU ISO C++ Library.  This library is free
  // software; you can redistribute it and/or modify it under the
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 455,462 ****
  	    {
  	      delete _M_data;
  	      _M_data = 0;
! 	      delete __wcs_ps;
! 	      delete __wcs_ns;	      
  #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
  	      __uselocale(__old);
  #else
--- 456,463 ----
  	    {
  	      delete _M_data;
  	      _M_data = 0;
! 	      delete [] __wcs_ps;
! 	      delete [] __wcs_ns;	      
  #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
  	      __uselocale(__old);
  #else
*************** _GLIBCXX_BEGIN_NAMESPACE(std)
*** 601,608 ****
  	    {
  	      delete _M_data;
                _M_data = 0;
! 	      delete __wcs_ps;
! 	      delete __wcs_ns;	      
  #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
  	      __uselocale(__old);
  #else
--- 602,609 ----
  	    {
  	      delete _M_data;
                _M_data = 0;
! 	      delete [] __wcs_ps;
! 	      delete [] __wcs_ns;	      
  #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
  	      __uselocale(__old);
  #else

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]