mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-20 00:10:41 -05:00
BUG/MAJOR: stream: avoid double free on unique_id
Commit 32211a1 ("BUG/MEDIUM: stream: Don't forget to free
s->unique_id in stream_free().") addressed a memory leak but in
exchange may cause double-free due to the fact that after freeing
s->unique_id it doesn't null it and then calls http_end_txn()
which frees it again. Thus the process quickly crashes at runtime.
This fix must be backported to all stable branches where the
aforementioned patch was backported.
This commit is contained in:
parent
4ddf59d070
commit
09c4bab411
1 changed files with 1 additions and 0 deletions
|
|
@ -387,6 +387,7 @@ static void stream_free(struct stream *s)
|
|||
}
|
||||
|
||||
pool_free(pool_head_uniqueid, s->unique_id);
|
||||
s->unique_id = NULL;
|
||||
|
||||
hlua_ctx_destroy(s->hlua);
|
||||
s->hlua = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue