From: Willy Tarreau Date: Mon, 11 May 2026 14:33:00 +0000 (+0200) Subject: BUG/MINOR: uri-auth: fix possible null-deref in latest fix for leaks X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=aa2c7034e1a3303a2ba34fe750e65047f39f1988;p=haproxy.git BUG/MINOR: uri-auth: fix possible null-deref in latest fix for leaks Latest commit 2dfbc311a8 ("BUG/MINOR: uri-auth: avoid leaks on initialization error") left a possible null-deref case which was surprisingly only detected by certain compiler combinations. No backport needed. --- diff --git a/src/uri_auth.c b/src/uri_auth.c index 9de6fbbc6..db1d83dc5 100644 --- a/src/uri_auth.c +++ b/src/uri_auth.c @@ -269,7 +269,7 @@ struct uri_auth *stats_add_auth(struct uri_auth **root, char *user) free(newuser->user); free(newuser); } - if (!old_u) { + if (u && !old_u) { if (u->userlist) { free(u->userlist->name); free(u->userlist);