Fix some of cppcheck warnings
Summary:
- selfInitialization
- memleak
I could probably suppress the selfInitialization warning, but probably
is cleaner this way. Opinions welcome. This also fixes the memleak in
autotest.
Test Plan:
- arc lint --everything
- Fix issues
- build
- run tests
Reviewers: Frameworks, aacid
Reviewed By: aacid
Subscribers: apol, aacid, kde-frameworks-devel
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D13559