diff --git a/nx/source/runtime/devices/socket.c b/nx/source/runtime/devices/socket.c index 5d91913f..a7c807fb 100644 --- a/nx/source/runtime/devices/socket.c +++ b/nx/source/runtime/devices/socket.c @@ -118,6 +118,10 @@ Result socketInitialize(const SocketInitConfig *config) { ret = bsdInitialize(&bcfg); if(R_SUCCEEDED(ret)) dev = AddDevice(&g_socketDevoptab); + else { + socketExit(); + return ret; + } if(dev == -1) { socketExit();