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/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
