Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


On Sun, 2010-11-07 at 14:16 +0100, julien wrote:
Hello,

I can't test this patch since this part of code is for Windows but i 
think it's a true positive

Yes, I agree, its a potential memory leak

Is this ok or am I wrong ?

Yeah, this is ok, and I've pushed this fix, thanks :-)

Though, if you look at the rest of the early returns in that function,
most of the rest of them also leak that data too, e.g. if the ReadBlock
fails it also leaks, and if the StgOpenStorage fails it also leaks as
well. I fixed up those additional ones myself with some more delete[] at
the right places, though something like a std::vector would make it all
easier to read I guess.

C.



Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.