message: [mdns] fix potential dereferencing nullptr when using avahi
  In the callback of resolving a service instance, the `aAddress` could
  be `nullptr` when `aEvent` is `AVAHI_RESOLVER_FOUND`.
diff: @@ -1040,15 +1040,15 @@ void PublisherAvahi::ServiceSubscription::HandleResolveResult(AvahiServiceResolv
  DiscoveredInstanceInfo instanceInfo;
  bool resolved = false;
  + VerifyOrExit(
  + aEvent == AVAHI_RESOLVER_FOUND,
  + otbrLogErr("failed to resolve service: %s", avahi_strerror(avahi_client_errno(mPublisherAvahi->mClient))));
  +
  avahi_address_snprint(addrBuf, sizeof(addrBuf), aAddress);
  otbrLogInfo("resolve service reply: protocol %d event %d %s.%s.%s = host %s address %s port %d flags %d", aProtocol,
  aEvent, aName, aType, aDomain, aHostName, addrBuf, aPort, aFlags);
  RemoveServiceResolver(aServiceResolver);
  -
  - VerifyOrExit(
  - aEvent == AVAHI_RESOLVER_FOUND,
  - otbrLogErr("failed to resolve service: %s", avahi_strerror(avahi_client_errno(mPublisherAvahi->mClient))));
  VerifyOrExit(aHostName != nullptr, otbrLogErr("host name is null"));
  instanceInfo.mNetifIndex = static_cast<uint32_t>(aInterfaceIndex);
  @@ -1166,9 +1166,12 @@ void PublisherAvahi::HostSubscription::HandleResolveResult(AvahiRecordBrowser *
  OTBR_UNUSED_VARIABLE(aType);
  OTBR_UNUSED_VARIABLE(aFlags);
  - Ip6Address address = *static_cast<const uint8_t(*)[16]>(aRdata);
  + Ip6Address address;
  bool resolved = false;
  + VerifyOrExit(aEvent == AVAHI_BROWSER_NEW);
  + address = Ip6Address(*static_cast<const uint8_t(*)[16]>(aRdata));
  +
  assert(mRecordBrowser == aRecordBrowser);
  avahi_record_browser_free(mRecordBrowser);
  mRecordBrowser = nullptr;
  