The fix in commit
2dfbc311a8 ("BUG/MINOR: uri-auth: avoid leaks on
initialization error") added *root = NULL, but the functions support
being called with root == NULL, though nothing does it in the whole
code. At least it triggers Coverity (see github issue #3476 and #3477).
So let's fix it.
No backport is needed since it cannot happen in the current code base.
free(u->userlist);
}
free(u);
- *root = NULL;
+ if (root)
+ *root = NULL;
}
return NULL;
}
out_u:
if (!old_u) {
free(u);
- *root = NULL;
+ if (root)
+ *root = NULL;
}
out:
return NULL;