From: Olivier Houchard Date: Tue, 21 Aug 2018 13:59:43 +0000 (+0200) Subject: BUG/MEDIUM: stream-int: Check if the conn_stream exist in si_cs_io_cb. X-Git-Tag: v1.9-dev2~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6ff03577017848e1246cbca985060fae97f43b3;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: stream-int: Check if the conn_stream exist in si_cs_io_cb. It is possible that the conn_stream gets detached from the stream_interface, and as it subscribed to the wait list, si_cs_io_cb() gets called anyway, so make sure we have a conn_stream before attempting to send more data. This is 1.9-specific, no backport is needed. --- diff --git a/src/stream_interface.c b/src/stream_interface.c index 4b5b760c85..52aa7c43d1 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -760,8 +760,12 @@ wake_others: struct task *si_cs_io_cb(struct task *t, void *ctx, unsigned short state) { struct stream_interface *si = ctx; + struct conn_stream *cs = objt_cs(si->end); + + if (!cs) + return NULL; if (!(si->wait_list.wait_reason & SUB_CAN_SEND)) - si_cs_send(__objt_cs(si->end)); + si_cs_send(cs); return (NULL); }