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.
This commit is contained in:
Willy Tarreau 2026-05-11 16:33:00 +02:00
parent 241cfb2483
commit aa2c7034e1

View File

@ -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);