ntdll: Fix a memory leak (Valgrind).

Signed-off-by: Chao Long <longchao@uniontech.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Chao Long 2020-09-09 14:04:39 +08:00 committed by Alexandre Julliard
parent e8a45561c8
commit d0946955ec
1 changed files with 5 additions and 1 deletions

View File

@ -2265,7 +2265,11 @@ static void parse_dependent_assembly_elem( xmlbuf_t *xmlbuf, struct actctx_loade
{
parse_assembly_identity_elem(xmlbuf, acl->actctx, &ai, &elem);
/* store the newly found identity for later loading */
if (ai.arch && !wcscmp(ai.arch, wildcardW)) ai.arch = strdupW( current_archW );
if (ai.arch && !wcscmp(ai.arch, wildcardW))
{
RtlFreeHeap( GetProcessHeap(), 0, ai.arch );
ai.arch = strdupW( current_archW );
}
TRACE( "adding name=%s version=%s arch=%s\n",
debugstr_w(ai.name), debugstr_version(&ai.version), debugstr_w(ai.arch) );
if (!add_dependent_assembly_id(acl, &ai)) set_error( xmlbuf );