engine: Fix coverity complaints

Change-Id: I88c2d7a1c4aab7261e9ddf5b69de127353f4a410
Signed-off-by: Moti Asayag <masayag@redhat.com>