[PATCH] xml_fetch_content_from_file: Read in whole file in one go (Re: [pushed] Fix double-free corruption)

Pedro Alves palves@redhat.com
Thu Oct 19 14:27:00 GMT 2017


On 10/18/2017 06:43 PM, John Baldwin wrote:
> On Tuesday, October 17, 2017 01:20:14 PM Pedro Alves wrote:

>> Looking a bit deeper, I can't seem to find a reason this code is
>> reading in chunks in the first place?  Why not read it all in one
>> go?  Like patch below.
> 
> Seems sensible.  It's unlikely that an XML file will be stored directly
> on a tape such that seek() is non-optimal. :)
> 

:-)

Thanks much for the review.  I pushed this in now.

-- 
Pedro Alves



More information about the Gdb-patches mailing list