From: Willy Tarreau Date: Tue, 8 May 2012 13:51:44 +0000 (+0200) Subject: BUG/MEDIUM: log: ensure that unique_id is properly initialized X-Git-Tag: v1.5-dev9~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd83314ee91824badaa23207188163089b7b2b22;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/peers.c b/src/peers.c index 182d71d23e..42018e13fe 100644 --- a/src/peers.c +++ b/src/peers.c @@ -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 diff --git a/src/session.c b/src/session.c index 862af58530..cd02da24d4 100644 --- a/src/session.c +++ b/src/session.c @@ -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 */