core: coverity issue fix.

CID 1230092

Change-Id: Id8a06231c6151530ff6c0fee9614b45f39c3a1dd
Signed-off-by: Martin Mucha <mmucha@redhat.com>