espressif / esp-protocols

Collection of ESP-IDF components related to networking protocols
181 stars 126 forks source link

fix(mdns): add lock for some common apis (IDFGH-12338) #529

Closed zwx1995esp closed 6 months ago

zwx1995esp commented 6 months ago

This PR fixes a thread-safe risk, some common apis do not take a look when operate the static global variable _mdns_server of mdns.

zwx1995esp commented 6 months ago

Hi @david-cermak I wrapped the API mdns_query_results_free with taking and giving the mdns service lock. PTAL.