From 539d0803466db2717d77ab41ccd7fe562aad68f0 Mon Sep 17 00:00:00 2001 From: robert Date: Wed, 7 May 2025 08:40:07 -0400 Subject: [PATCH] check null pointer --- tutorials/udp/mdns-server/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tutorials/udp/mdns-server/main.c b/tutorials/udp/mdns-server/main.c index 2041a3f8..6c4f4179 100644 --- a/tutorials/udp/mdns-server/main.c +++ b/tutorials/udp/mdns-server/main.c @@ -12,6 +12,7 @@ int main(void) { // Desired name must NOT have any dots in it, nor a domain c = mg_mdns_listen(&mgr, "Mongoose"); // Start mDNS server + if (c == NULL) return 1; // if not using our built-in TCP/IP stack, pass the IP address you want to // use as a response, this depends on your underlying TCP/IP stack and number // of interfaces available