mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user