Fix memory leak in KXzFilter::init
ClosedPublic

Authored by aacid on Oct 24 2019, 10:54 PM.

Details

Summary

I wasn't 99% sure we need to free the filters so early since we're passing them to the functions that manipulate the streams,
but having a look at various other code using lzma they also free them very early and the fact that everything still works is also a good indicator

Test Plan

Before valgrind --leak-check=full karchivetest gave memory leaks, now it does not

Diff Detail

Repository
R243 KArchive
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
aacid created this revision.Oct 24 2019, 10:54 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptOct 24 2019, 10:54 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
aacid requested review of this revision.Oct 24 2019, 10:54 PM
apol added a subscriber: apol.Oct 25 2019, 12:12 AM

+1 makes sense

aacid added a comment.Oct 30 2019, 6:24 PM

I'll commit this on saturday unless someone disagrees

This revision was not accepted when it landed; it landed in state Needs Review.Nov 2 2019, 12:33 PM
This revision was automatically updated to reflect the committed changes.