]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: mux-fcgi: Be sure to have a connection to unsubcribe
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 18 Sep 2019 09:11:46 +0000 (11:11 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 18 Sep 2019 09:20:55 +0000 (11:20 +0200)
When the mux is released, It must own the connection to unsubcribe.
This patch fixes the issue #283. No backport needed.

src/mux_fcgi.c

index d2115ac9c51a8d558ef48192be035b35e29cb3fe..ea8e48ba17d6b6c3ecc1edf0701df72b3d46d66e 100644 (file)
@@ -576,7 +576,7 @@ static void fcgi_release(struct fcgi_conn *fconn)
                }
                if (fconn->wait_event.tasklet)
                        tasklet_free(fconn->wait_event.tasklet);
-               if (fconn->wait_event.events != 0)
+               if (conn && fconn->wait_event.events != 0)
                        conn->xprt->unsubscribe(conn, conn->xprt_ctx, fconn->wait_event.events,
                                                &fconn->wait_event);
        }