mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-23 23:28:47 -04:00
BUG/MAJOR: stream: Missing DNS context initializations.
Fix some missing initializations wich came with 333939c commit (MINOR: action:
new '(http-request|tcp-request content) do-resolve' action). The DNS contexts of
streams which were allocated were not initialized by stream_new(). This leaded to
accesses to non-allocated memory when freeing these contexts with stream_free().
This commit is contained in:
parent
ca8df4c074
commit
bed883abe8
1 changed files with 5 additions and 0 deletions
|
|
@ -310,6 +310,11 @@ struct stream *stream_new(struct session *sess, enum obj_type *origin)
|
|||
s->txn = NULL;
|
||||
s->hlua = NULL;
|
||||
|
||||
s->dns_ctx.dns_requester = NULL;
|
||||
s->dns_ctx.hostname_dn = NULL;
|
||||
s->dns_ctx.hostname_dn_len = 0;
|
||||
s->dns_ctx.parent = NULL;
|
||||
|
||||
HA_SPIN_LOCK(STRMS_LOCK, &streams_lock);
|
||||
LIST_ADDQ(&streams, &s->list);
|
||||
HA_SPIN_UNLOCK(STRMS_LOCK, &streams_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue