From 965c43c57a464057439624caf3e8dcf127dbff49 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Fri, 9 Nov 2018 00:13:08 -0500 Subject: [PATCH] fixes race in _proxy_ward_close by unlinking early --- vere/http.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vere/http.c b/vere/http.c index 3f3ff83d1..3cd0a4c3a 100644 --- a/vere/http.c +++ b/vere/http.c @@ -2140,7 +2140,6 @@ _proxy_ward_free(uv_handle_t* han_u) u3_ward* rev_u = han_u->data; u3z(rev_u->sip); - _proxy_ward_unlink(rev_u); free(rev_u->non_u.base); free(rev_u); } @@ -2160,6 +2159,8 @@ _proxy_ward_close_timer(uv_handle_t* han_u) static void _proxy_ward_close(u3_ward* rev_u) { + _proxy_ward_unlink(rev_u); + while ( 0 != rev_u->won_u ) { _proxy_wcon_close(rev_u->won_u); rev_u->won_u = rev_u->won_u->nex_u;