Re: [xslt] Memory Leak



good catch
Daniel, here is a small patch for date.c.

Charlie B.


On Fri, 2002-11-22 at 10:40, Bernard.Brinkhus@ubsw.com wrote:
> Module:		libexslt
> File:			date.c
> Version:		1.0.21
> Function:		exsltDateDurationFunction
> Description:	In this function the xmlChar *number is leaking. Needs to be freed.
> 
> Regards
> Bernard
> 
> Visit our website at http://www.ubswarburg.com
> 
> This message contains confidential information and is intended only 
> for the individual named.  If you are not the named addressee you 
> should not disseminate, distribute or copy this e-mail.  Please 
> notify the sender immediately by e-mail if you have received this 
> e-mail by mistake and delete this e-mail from your system.
> 
> E-mail transmission cannot be guaranteed to be secure or error-free 
> as information could be intercepted, corrupted, lost, destroyed, 
> arrive late or incomplete, or contain viruses.  The sender therefore 
> does not accept liability for any errors or omissions in the contents 
> of this message which arise as a result of e-mail transmission.  If 
> verification is required please request a hard-copy version.  This 
> message is provided for informational purposes and should not be 
> construed as a solicitation or offer to buy or sell any securities or 
> related financial instruments.
> 
> _______________________________________________
> xslt mailing list, project page http://xmlsoft.org/XSLT/
> xslt@gnome.org
> http://mail.gnome.org/mailman/listinfo/xslt
> 

Index: date.c
===================================================================
RCS file: /cvs/gnome/libxslt/libexslt/date.c,v
retrieving revision 1.16
diff -c -r1.16 date.c
*** date.c	18 Sep 2002 13:47:57 -0000	1.16
--- date.c	22 Nov 2002 21:35:06 -0000
***************
*** 3432,3437 ****
--- 3432,3440 ----
  
      ret = exsltDateDuration(number);
  
+     if (number != NULL)
+ 	xmlFree(number);
+ 
      if (ret == NULL)
  	xmlXPathReturnEmptyString(ctxt);
      else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]