Author: pschweitzer
Date: Fri May 3 19:31:03 2013
New Revision: 58916
URL:
http://svn.reactos.org/svn/reactos?rev=58916&view=rev
Log:
[NTOSKRNL]
Prevent potential double free in loop.
Fixes CID 732510
Modified:
trunk/reactos/ntoskrnl/io/iomgr/error.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/error.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/error.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/error.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/error.c [iso-8859-1] Fri May 3 19:31:03 2013
@@ -367,7 +367,11 @@
DeviceNameLength += sizeof(WCHAR);
/* Free the buffer if we had one */
- if (PoolObjectNameInfo) ExFreePool(PoolObjectNameInfo);
+ if (PoolObjectNameInfo)
+ {
+ ExFreePool(PoolObjectNameInfo);
+ PoolObjectNameInfo = NULL;
+ }
/* Go to the next string buffer position */
ErrorMessage->EntryData.NumberOfStrings++;
@@ -428,7 +432,7 @@
break;
}
- /* Derefernece the device object */
+ /* Dereference the device object */
if (LogEntry->DeviceObject) ObDereferenceObject(LogEntry->DeviceObject);
if (DriverObject) ObDereferenceObject(LogEntry->DriverObject);