aclui: Fix a leak on error path (Coverity).

Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sven Baars 2021-04-24 13:24:04 +02:00 committed by Alexandre Julliard
parent a8ec44e896
commit 53e7842e64
1 changed files with 3 additions and 0 deletions

View File

@ -120,7 +120,10 @@ static void add_user(struct security_page *page, PSID sid)
return;
if (!(new_array = realloc(page->users, (page->user_count + 1) * sizeof(*page->users))))
{
free(name);
return;
}
page->users = new_array;
user = &page->users[page->user_count++];