mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[WINESYNC] msi: Avoid leaking memory on failure paths in MsiGetPropertyA().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 2e2934e455318c2753741a051876bc0a3c2399fa by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
parent
4f51867f22
commit
02726bbc20
1 changed files with 5 additions and 1 deletions
|
@ -2375,9 +2375,14 @@ UINT WINAPI MsiGetPropertyA(MSIHANDLE hinst, const char *name, char *buf, DWORD
|
|||
DWORD len;
|
||||
|
||||
if (!(remote = msi_get_remote(hinst)))
|
||||
{
|
||||
heap_free(nameW);
|
||||
return ERROR_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
r = remote_GetProperty(remote, nameW, &value, &len);
|
||||
heap_free(nameW);
|
||||
|
||||
if (!r)
|
||||
{
|
||||
/* String might contain embedded nulls.
|
||||
|
@ -2395,7 +2400,6 @@ UINT WINAPI MsiGetPropertyA(MSIHANDLE hinst, const char *name, char *buf, DWORD
|
|||
heap_free(tmp);
|
||||
}
|
||||
midl_user_free(value);
|
||||
heap_free(nameW);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue