More fixes of some Coverity issues.

Signed-off-by: Ruben Moral <Ruben.Moral@digi.com>