Skip to content

Commit

Permalink
Fixing crash (project-chip#36343)
Browse files Browse the repository at this point in the history
  • Loading branch information
woody-apple authored Nov 2, 2024
1 parent f3a9fe9 commit 744f45c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/darwin/Framework/CHIP/MTRDeviceConnectivityMonitor.mm
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ - (void)handleResolvedHostname:(const char *)hostName port:(uint16_t)port error:
{
std::lock_guard lock(sConnectivityMonitorLock);

if (hostName == NULL) {
MTR_LOG_ERROR("%@ NULL host resolved, ignoring", self);
return;
}
// dns_sd.h: must check and call deallocate if error is kDNSServiceErr_ServiceNotRunning
if (error == kDNSServiceErr_ServiceNotRunning) {
MTR_LOG_ERROR("%@ disconnected from dns-sd subsystem", self);
Expand Down

0 comments on commit 744f45c

Please sign in to comment.