]> granicus.if.org Git - esp-idf/commit
mdns: fix possible deadlock on mdns deinit calling mdns_free()
authorDavid Cermak <cermak@espressif.com>
Mon, 4 Mar 2019 10:13:52 +0000 (11:13 +0100)
committerDavid Cermak <cermak@espressif.com>
Wed, 13 Mar 2019 15:24:03 +0000 (16:24 +0100)
commit8e4ec90dc4d25990f2ea35e8ce9279b74fd62aac
tree3933aa254172e7d8d70b27b702c0ca69e7504e72
parent0e06b4d65381e53aaf3adf09c75ea1cf5a7bfcc5
mdns: fix possible deadlock on mdns deinit calling mdns_free()

mnds_free() initiates stop and delete timer tasks, which after locking the mutex could lead to a dead lock in case timer task executed before deleting the task, as it would wait indefinitelly for unlocking the mutex. This condition is fixed by calling _mdns_stop_timer without locking the mutex, because there's no need to protect any data when stopping and deleting the timer task

Closes https://github.com/espressif/esp-idf/issues/1696
components/mdns/mdns.c