From 152ca59daf3abc63081bc5da9748d86cbb75c1af Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Mon, 22 Dec 2014 20:32:58 +0000 Subject: [PATCH] yaid.c (cancel_proxy): Reorder destruction a little. Alas, `selbuf_enable' can invoke its per-line function, in this case `client_line', immediately. So we need to make sure we've detached this proxy structure before that happens: if we do it afterwards, we risk clobbering any new proxy that `client_line' has acquired in the meantime. --- yaid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yaid.c b/yaid.c index 2548caf..cc3bb47 100644 --- a/yaid.c +++ b/yaid.c @@ -365,8 +365,8 @@ static void cancel_proxy(struct proxy *px) selbuf_destroy(&px->b); free_writebuf(&px->wb); } - selbuf_enable(&px->c->b); px->c->px = 0; + selbuf_enable(&px->c->b); xfree(px); } -- 2.11.0