Merge "Fix a mdns coverity issue to avoid RESOURCE_LEAK" into main