Review Request: Prevent memory leaks when opening a zip store multiple times
Sebastian Sauer
mail at dipe.org
Thu Oct 7 14:13:20 BST 2010
> On 2010-10-07 13:11:50, Sebastian Sauer wrote:
> > Wouldn't it be better if terminate() is just called as the first action if init() is called again? That way we would keep the previous behavior to just open again (and don't ignore e.g. another mode passed on to init()) and lose the old state (but this time without losing mem). Also I guess the same check+call of terminate() needs to happen in the dtor.
> >
> Wouldn't it be better if terminate() is just called as the first action if init() is called again?
I mean if the user didn't called it manually ;)
- Sebastian
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5536/#review8014
-----------------------------------------------------------
On 2010-10-06 14:15:56, Boudewijn Rempt wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5536/
> -----------------------------------------------------------
>
> (Updated 2010-10-06 14:15:56)
>
>
> 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/20101007/20f29d4e/attachment.htm>
More information about the kde-core-devel
mailing list