mslookup_client_mdns.c: fix dereferencing null

Fixes: CID#207545
Change-Id: I0f7fbbdb663304bd5214cba4a6e4abe1dd165cfa
diff --git a/src/mslookup/mslookup_client_mdns.c b/src/mslookup/mslookup_client_mdns.c
index 7ba3502..255430b 100644
--- a/src/mslookup/mslookup_client_mdns.c
+++ b/src/mslookup/mslookup_client_mdns.c
@@ -114,6 +114,7 @@
 	if (!msg) {
 		LOGP(DMSLOOKUP, LOGL_ERROR, "Cannot encode request: %s\n",
 		     osmo_mslookup_result_name_b(buf, sizeof(buf), query, NULL));
+		return;
 	}
 
 	/* Send over the wire */