]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: connection: Stop directly setting an ist's .ptr
authorTim Duesterhus <tim@bastelstu.be>
Sat, 14 Mar 2020 12:07:05 +0000 (13:07 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 14 Mar 2020 17:31:58 +0000 (18:31 +0100)
Instead replace the complete `ist` by the value returned from `ist2`.

This was noticed during review of issue #549.

src/connection.c

index c1ec2664e48c06a08b80956786202265c4d6a15d..462dbf02975e7a884fd6082317ac1e18418d147e 100644 (file)
@@ -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) {