Title: #456: Fix the covscan warning that PR #455 triggered
This patch must be applied atop of PR #455!
@sumit-bose, if you prefer, feel free to add this patch to PR #455 and close this one.
To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/456/head:pr456
git checkout pr456