[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] FW: Some more memleak fixes in Parser.c
- From: Daniel Veillard <veillard redhat com>
- To: Ashwin <ashwins huawei com>
- Cc: xml gnome org, ranjit huawei com
- Subject: Re: [xml] FW: Some more memleak fixes in Parser.c
- Date: Tue, 8 Apr 2008 10:50:09 -0400
On Wed, Apr 02, 2008 at 11:38:48AM +0530, Ashwin wrote:
> Oops, forgot to attach the patch!!! Sorry
>
> Hi,
>
> I am attaching a patch for memleak in InputPush function in case realloc
> fails. realloc was being done on the original pointer, and inputstream was
> not being freed in case of failure. Also returning from functions calling
> xmlPushInput if memory failure has occurred (Not sure whther this is
> required in all cases).
>
While the description sounds good, the patch didn't apply to CVS, could
you double-check the patch please ?
>
> Another query is for a lot of places where Inputpush function is invoked the
> return value is not checked, from what I could make out this is because at
> the time of context creation the number of input streams is set to 5, and
> since push is being called directly afterwards, the number of streams will
> not be more than 5 and thus the realloc block inside inputPush will not be
> hit. So perhaps that is why memory failure is not expected in those paths.
Hum, no, I guess it's an oversight which should be fixed too.
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]