Fixes memory leak in KItemListViewAccessible

Authored by hallas on Jul 18 2018, 9:20 PM.

Description

Fixes memory leak in KItemListViewAccessible

Summary: The KItemListViewAccessible class has a list of QAccessibleInterface pointers in a member variable m_cells. The problem is that when new entries are created, the newly allocated pointer is not stored in the list, only a nullptr is store, this renders the cleanup code in the destructor useless. This patch simply stores the pointer in the list, causing the destructor to correctly free the memory.

Test Plan: I found this issue using address sanitizer. Simply building Dolphin with -fsanitize=address and opening a window caused the memory leak.

Reviewers: Dolphin, jtamate, elvisangelaccio

Reviewed By: Dolphin, jtamate, elvisangelaccio

Subscribers: elvisangelaccio, kfm-devel

Tags: Dolphin

Differential Revision: https://phabricator.kde.org/D14168

Details

Committed
elvisangelaccioJul 18 2018, 9:20 PM
Reviewer
Dolphin
Differential Revision
D14168: Fixes memory leak in KItemListViewAccessible
Parents
R318:43ab5bdc5f8b: Removes unused member variables
Branches
Unknown
Tags
Unknown