mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-13 15:04:42 +00:00
BUG/MEDIUM: sessions: Set sess->origin to NULL if the origin was destroyed.
When ending a stream, if the origin is an appctx, the appctx will have been destroyed already, but it does not destroy the session. So later, when we try to destroy the session, we try to dereference sess->origin and die trying. Fix this by explicitely setting sess->origin to NULL before calling session_free().
This commit is contained in:
parent
1295016873
commit
25607afa0a
@ -434,8 +434,10 @@ static void stream_free(struct stream *s)
|
||||
tasklet_free(s->si[0].wait_event.task);
|
||||
tasklet_free(s->si[1].wait_event.task);
|
||||
|
||||
if (must_free_sess)
|
||||
if (must_free_sess) {
|
||||
sess->origin = NULL;
|
||||
session_free(sess);
|
||||
}
|
||||
|
||||
pool_free(pool_head_stream, s);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user