Fix spurious mutex lock in MDnsEventReporter

The mEventListeners needs to be protected by lock. There are 4 places
use it without acquiring a mutex lock.

- MDnsSdListenerDiscoverCallback
- MDnsSdListenerRegisterCallback
- MDnsSdListenerResolveCallback
- MDnsSdListenerGetAddrInfoCallback

Although there is a std::lock_guard in the getEventListenersImpl(), the
lock is auto-released when leaving the function.

Bug: 256046108
Test: atest
Change-Id: I00c57c111e03481a6defba6a94ffc1ebd58d73d2
3 files changed
tree: fdeda003d944ece3c799044bdb9f0ceef4574cf2
  1. client/
  2. include/
  3. netutils_wrappers/
  4. server/
  5. tests/
  6. .editorconfig
  7. Android.bp
  8. NOTICE
  9. OWNERS
  10. PREUPLOAD.cfg
  11. TEST_MAPPING