mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
[MUP]
Fix uninitialized address freeing in case of error in MupGetProviderInformation(), InitializeProvider() CID 1322227 CID 1322240 svn path=/trunk/; revision=68990
This commit is contained in:
parent
414b2645fd
commit
cf68c63f61
1 changed files with 11 additions and 0 deletions
|
@ -950,6 +950,10 @@ InitializeProvider(PCWSTR ProviderName,
|
|||
|
||||
Status = ZwQueryValueKey(KeyHandle, &Value, KeyValueFullInformation, Info, ResultLength, &ResultLength);
|
||||
}
|
||||
else
|
||||
{
|
||||
Info = NULL;
|
||||
}
|
||||
|
||||
ZwClose(KeyHandle);
|
||||
|
||||
|
@ -959,6 +963,7 @@ InitializeProvider(PCWSTR ProviderName,
|
|||
*/
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
ASSERT(Info != NULL);
|
||||
AddUnregisteredProvider((PWSTR)((ULONG_PTR)Info + Info->DataOffset), ProviderOrder);
|
||||
}
|
||||
|
||||
|
@ -1006,11 +1011,17 @@ MupGetProviderInformation(VOID)
|
|||
|
||||
Status = ZwQueryValueKey(KeyHandle, &ProviderOrder, KeyValueFullInformation, Info, ResultLength, &ResultLength);
|
||||
}
|
||||
else
|
||||
{
|
||||
Info = NULL;
|
||||
}
|
||||
|
||||
ZwClose(KeyHandle);
|
||||
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
ASSERT(Info != NULL);
|
||||
|
||||
Providers = (PWSTR)((ULONG_PTR)Info + Info->DataOffset);
|
||||
End = FALSE;
|
||||
ProviderCount = 0;
|
||||
|
|
Loading…
Reference in a new issue