Skip to content

Commit 84e6e1a

Browse files
authored
Check this at home. (#9744)
1 parent 698c732 commit 84e6e1a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/platform/Linux/MdnsImpl.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,10 @@ CHIP_ERROR MdnsAvahi::PublishService(const MdnsService & service)
512512
CHIP_ERROR MdnsAvahi::StopPublish()
513513
{
514514
CHIP_ERROR error = CHIP_NO_ERROR;
515-
516-
VerifyOrExit(avahi_entry_group_reset(mGroup) == 0, error = CHIP_ERROR_INTERNAL);
515+
mPublishedServices.clear();
516+
if (mGroup) {
517+
VerifyOrExit(avahi_entry_group_reset(mGroup) == 0, error = CHIP_ERROR_INTERNAL);
518+
}
517519
exit:
518520
return error;
519521
}

0 commit comments

Comments
 (0)