Skip to content

Commit 539d080

Browse files
author
robert
committed
check null pointer
1 parent 041ec6e commit 539d080

File tree

1 file changed

+1
-0
lines changed
  • tutorials/udp/mdns-server

1 file changed

+1
-0
lines changed

tutorials/udp/mdns-server/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ int main(void) {
1212

1313
// Desired name must NOT have any dots in it, nor a domain
1414
c = mg_mdns_listen(&mgr, "Mongoose"); // Start mDNS server
15+
if (c == NULL) return 1;
1516
// if not using our built-in TCP/IP stack, pass the IP address you want to
1617
// use as a response, this depends on your underlying TCP/IP stack and number
1718
// of interfaces available

0 commit comments

Comments
 (0)