mgmt: hawkbit: Fix resources leakage
mgmt: hawkbit: Fix resources leakage

Coverity spots that memory allocated for addr was leaking, but the
code was also leaking the socket file descriptor in the error path.
This patch fixes both problems.

Fixes #28172

Signed-off-by: Flavio Ceolin <979b9165500b0741b9d0500e2efd74fc1547bff7@intel.com>

nashif/zephyr,galak/zephyr,Vudentz/zephyr,galak/zephyr,finikorg/zephyr,finikorg/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,Vudentz/zephyr,finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,Vudentz/zephyr,galak/zephyr,nashif/zephyr,Vudentz/zephyr,nashif/zephyr,nashif/zephyr,galak/zephyr,zephyrproject-rtos/zephyr