]> granicus.if.org Git - curl/commit
dns: release sharelock as soon as possible
authorDaniel Gustafsson <daniel@yesql.se>
Mon, 11 Feb 2019 12:34:11 +0000 (13:34 +0100)
committerDaniel Gustafsson <daniel@yesql.se>
Mon, 11 Feb 2019 12:34:11 +0000 (13:34 +0100)
commite5d574c54fa795a090054e4f825a07d0a516bf0d
tree62f6251aacc1cdb0cedb36ac8094002ac9c1a1d0
parent3f16990ec84cc4b25e6b765d5cc3217f356681b7
dns: release sharelock as soon as possible

There is no benefit to holding the data sharelock when freeing the
addrinfo in case it fails, so ensure releaseing it as soon as we can
rather than holding on to it. This also aligns the code with other
consumers of sharelocks.

Closes #3516
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
lib/hostasyn.c