troglobit / mdnsd

Jeremie Miller's original mdnsd
BSD 3-Clause "New" or "Revised" License
55 stars 35 forks source link

Fix possible memory leak and NULL dereference #38

Closed wolframroesler closed 4 years ago

wolframroesler commented 4 years ago

Avoid potential memory leak when loading the config file, and potential NULL pointer dereference when processing a multicast packet. Both happen under obscure circumstances only (I think). Spotted during static analysis with clang-tidy-9.

This PR fixes the last findings we got from clang-tidy, with the exception of the one described in https://github.com/troglobit/mdnsd/issues/37.

troglobit commented 4 years ago

Awesome work on this, thanks!