fix coverity errors

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