samples: net: mdns_responder: Fix coverity resource leak issue
samples: net: mdns_responder: Fix coverity resource leak issue

Avoid resource leak by closing socket when there is an error.

Coverity-CID: 215381
Fixes #33094

Signed-off-by: Guðni Már Gilbert <a67b89b8b42b5e36ccc84f3061af0045ff2a5bff@gmail.com>

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