[Libreoffice] [PUSHED] Re: [PATCH to test on Windows env] memory leak htags.cpp according to cppcheck
Caolán McNamara
caolanm at redhat.com
Mon Nov 8 06:36:41 PST 2010
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.
More information about the LibreOffice
mailing list