1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

msi: Fix memory leak on error path in MSI_ProcessMessage (scan-build).

This commit is contained in:
Alex Henrie 2023-06-07 23:02:56 -06:00 committed by Alexandre Julliard
parent b630718149
commit d06b3fd527

View file

@ -1897,7 +1897,12 @@ INT MSI_ProcessMessage( MSIPACKAGE *package, INSTALLMESSAGE eMessageType, MSIREC
}
template = malloc((wcslen(template_rec) + wcslen(template_prefix) + 1) * sizeof(WCHAR));
if (!template) return ERROR_OUTOFMEMORY;
if (!template)
{
free(template_prefix);
free(template_rec);
return ERROR_OUTOFMEMORY;
}
lstrcpyW(template, template_prefix);
lstrcatW(template, template_rec);