msi: Fix a leak of allocated string buffer on error path (Coverity).

This commit is contained in:
Nikolay Sivov 2014-03-27 06:55:45 +04:00 committed by Alexandre Julliard
parent dc33b13581
commit c01c0b52ed
1 changed files with 5 additions and 1 deletions

View File

@ -370,7 +370,11 @@ static LPWSTR build_default_format(const MSIRECORD* record)
{
max_len = len;
buf = msi_realloc(buf, (max_len + 1) * sizeof(WCHAR));
if (!buf) return NULL;
if (!buf)
{
msi_free(rc);
return NULL;
}
}
if (str)