Review Request: Prevent memory leaks when opening a zip store multiple times

Hans Meine hans_meine at gmx.net
Fri Oct 8 13:34:04 BST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5536/#review8037
-----------------------------------------------------------

Ship it!


Looks fine to me, but I am no maintainer.

(My suggestion was to check whether open() was called with the same parameter, but indeed it makes probably even more sense to just raise an error in this condition.)

- Hans


On 2010-10-07 19:36:50, Boudewijn Rempt wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5536/
> -----------------------------------------------------------
> 
> (Updated 2010-10-07 19:36:50)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> It is possible to accidentally call open() twice. If you do that on a zip store, kgzipfilter will be initialized twice, deflateInit2 will be called twice and we leak memory.
> 
> 
> Diffs
> -----
> 
>   trunk/KDE/kdelibs/kdecore/compression/kbzip2filter.cpp 1182756 
>   trunk/KDE/kdelibs/kdecore/compression/kfilterdev.cpp 1182756 
>   trunk/KDE/kdelibs/kdecore/compression/kgzipfilter.cpp 1182756 
>   trunk/KDE/kdelibs/kdecore/compression/kxzfilter.cpp 1182756 
> 
> Diff: http://svn.reviewboard.kde.org/r/5536/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Boudewijn
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20101008/a6464493/attachment.htm>


More information about the kde-core-devel mailing list