]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: backend: shut another false null-deref in back_handle_st_con()
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 10:40:40 +0000 (11:40 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Jan 2020 10:40:40 +0000 (11:40 +0100)
objt_conn() may return a NULL though here we don't have this situation
anymore since the connection is always there, so let's simply switch
to the unchecked __objt_conn(). This addresses issue #454.

src/backend.c

index 859a004264b9c7cf5f9a156cc57251f88fdcdea0..ed2c969435988fc8254d5dda11e99122b6fef562 100644 (file)
@@ -1916,7 +1916,7 @@ void back_handle_st_con(struct stream *s)
        struct channel *req = &s->req;
        struct channel *rep = &s->res;
        struct conn_stream *srv_cs = objt_cs(si->end);
-       struct connection *conn = srv_cs ? srv_cs->conn : objt_conn(si->end);
+       struct connection *conn = srv_cs ? srv_cs->conn : __objt_conn(si->end);
 
        DBG_TRACE_ENTER(STRM_EV_STRM_PROC|STRM_EV_SI_ST, s);