backport Coverity Reports fixes from current libkface implementation from git/master.
See original commit : https://projects.kde.org/projects/extragear/libs/libkface/repository/revisions/c47a2a53fe370a2e07194ca56a51e34a45a90816