BUG/MEDIUM: log: ensure that unique_id is properly initialized

Last memory poisonning patch immediately made this issue appear.
The unique_id field is released but not properly initialized. The
feature was introduced very recently, no backport is needed.
This commit is contained in:
Willy Tarreau 2012-05-08 15:51:44 +02:00
parent 6e0644339f
commit bd83314ee9
2 changed files with 2 additions and 0 deletions

View File

@ -1204,6 +1204,7 @@ static struct session *peer_session_create(struct peer *peer, struct peer_sessio
s->srv_error = default_srv_error;
s->uniq_id = 0;
s->unique_id = NULL;
txn = &s->txn;
/* Those variables will be checked and freed if non-NULL in

View File

@ -97,6 +97,7 @@ int session_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
LIST_ADDQ(&sessions, &s->list);
LIST_INIT(&s->back_refs);
s->unique_id = NULL;
s->term_trace = 0;
s->si[0].addr.from = *addr;
s->logs.accept_date = date; /* user-visible date for logging */