Fix coverity errors

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>