mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
[NTOSKRNL]
Prevent potential double free in loop. Fixes CID 732510 svn path=/trunk/; revision=58916
This commit is contained in:
@@ -367,7 +367,11 @@ IopLogWorker(IN PVOID Parameter)
|
||||
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 @@ IopLogWorker(IN PVOID Parameter)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Derefernece the device object */
|
||||
/* Dereference the device object */
|
||||
if (LogEntry->DeviceObject) ObDereferenceObject(LogEntry->DeviceObject);
|
||||
if (DriverObject) ObDereferenceObject(LogEntry->DriverObject);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user