[Klockwork] NULL pointer may be dereferenced. (#3)

Fix issue #3: device_type may be NULL and may be dereferenced.

Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
[Klockwork] NULL pointer may be dereferenced. (#26)

Fix issue #26: ip_address may be NULL and may be dereferenced.

Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
[Klockwork] NULL pointer may be dereferenced. (#27)

Fix issue #27: ip_address may be NULL and may be dereferenced.

Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>