Fix heap-use-after-free in Part destructor

Review Request #125366 - Created Sept. 23, 2015 and submitted

Information
Albert Astals Cid
konsole
Reviewers
konsole
hindenburg

Tear down the ViewManager on the Part destructor instead of letting Qt destroy the child objects itself.

This way we control the sequence more and make sure we don't end up using memory that was already deleted. Fixes the ASAN detected problem in https://build.kde.org/job/konsole%20Applications-15.08%20stable-kf5-qt5/PLATFORM=Linux,compiler=gcc/12/testReport/%28root%29/TestSuite/PartTest/

Neither ASAN nor valgrind complain anymore when running PartTest.

Kurt Hindenburg
Albert Astals Cid
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 16b3919ff8da3a8e2256602f4751f5fd8085fc42 by Albert Astals Cid to branch master.
Loading...