Author: pschweitzer
Date: Fri Sep 4 13:58:44 2015
New Revision: 68990
URL:
http://svn.reactos.org/svn/reactos?rev=68990&view=rev
Log:
[MUP]
Fix uninitialized address freeing in case of error in MupGetProviderInformation(),
InitializeProvider()
CID 1322227
CID 1322240
Modified:
trunk/reactos/drivers/filesystems/mup/mup.c
Modified: trunk/reactos/drivers/filesystems/mup/mup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/mup/mu…
==============================================================================
--- trunk/reactos/drivers/filesystems/mup/mup.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/mup/mup.c [iso-8859-1] Fri Sep 4 13:58:44 2015
@@ -950,6 +950,10 @@
Status = ZwQueryValueKey(KeyHandle, &Value, KeyValueFullInformation, Info,
ResultLength, &ResultLength);
}
+ else
+ {
+ Info = NULL;
+ }
ZwClose(KeyHandle);
@@ -959,6 +963,7 @@
*/
if (NT_SUCCESS(Status))
{
+ ASSERT(Info != NULL);
AddUnregisteredProvider((PWSTR)((ULONG_PTR)Info + Info->DataOffset),
ProviderOrder);
}
@@ -1006,11 +1011,17 @@
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;