diff --git a/reactos/ntoskrnl/io/iomgr/error.c b/reactos/ntoskrnl/io/iomgr/error.c index 07197ff39b4..0c7c14ec926 100644 --- a/reactos/ntoskrnl/io/iomgr/error.c +++ b/reactos/ntoskrnl/io/iomgr/error.c @@ -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);