From: Tim Duesterhus Date: Sat, 14 Mar 2020 12:07:05 +0000 (+0100) Subject: CLEANUP: connection: Stop directly setting an ist's .ptr X-Git-Tag: v2.2-dev5~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2b7f6c22d868d23adb7cc8232464fe3f68b05b0d;p=thirdparty%2Fhaproxy.git CLEANUP: connection: Stop directly setting an ist's .ptr Instead replace the complete `ist` by the value returned from `ist2`. This was noticed during review of issue #549. --- diff --git a/src/connection.c b/src/connection.c index c1ec2664e4..462dbf0297 100644 --- a/src/connection.c +++ b/src/connection.c @@ -760,7 +760,7 @@ int conn_recv_proxy(struct connection *conn, int flag) if (tlv.len > UNIQUEID_LEN) goto bad_header; - conn->proxy_unique_id.ptr = pool_alloc(pool_head_uniqueid); + conn->proxy_unique_id = ist2(pool_alloc(pool_head_uniqueid), 0); if (!isttest(conn->proxy_unique_id)) goto fail; if (istcpy(&conn->proxy_unique_id, tlv, UNIQUEID_LEN) < 0) {