msi: Fix memory leak on error path in MSI_ProcessMessage (scan-build).
This commit is contained in:
parent
b630718149
commit
d06b3fd527
1 changed files with 6 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue