[GiNaC-devel] [SCM] GiNaC -- a C++ library for symbolic	computations branch, ginac_1-5, updated. release_1-4-0-198-g8bf0597
    Alexei Sheplyakov 
    varg at metalica.kh.ua
       
    Fri Jul 31 16:38:27 CEST 2009
    
    
  
On Fri, Jul 31, 2009 at 03:30:45PM +0200, Jens Vollinga wrote:
> oops, yes, thanks. What was I thinking?!?
71         GiNaC::function* f;
72         try {
73                 f = new GiNaC::function(reinterpret_cast<unsigned>(reader->second), args);
74         }
75         catch ( std::runtime_error ) {
I think 
		if (f)
			delete f;
should be inserted here, otherwise we might leak memory if ->second is
a pointer to a (C++) function.
Best regards,
	Alexei
    
    
More information about the GiNaC-devel
mailing list