Don't check pointers for NULL before RtlFreeHeap. It is redundant.
This commit is contained in:
parent
968ad51d2a
commit
7a8818e717
|
@ -386,11 +386,8 @@ void WINAPI MakeCriticalSectionGlobal( CRITICAL_SECTION *crit )
|
|||
HANDLE sem = crit->LockSemaphore;
|
||||
if (!sem) NtCreateSemaphore( &sem, SEMAPHORE_ALL_ACCESS, NULL, 0, 1 );
|
||||
crit->LockSemaphore = ConvertToGlobalHandle( sem );
|
||||
if (crit->DebugInfo)
|
||||
{
|
||||
RtlFreeHeap( GetProcessHeap(), 0, crit->DebugInfo );
|
||||
crit->DebugInfo = NULL;
|
||||
}
|
||||
RtlFreeHeap( GetProcessHeap(), 0, crit->DebugInfo );
|
||||
crit->DebugInfo = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -107,9 +107,9 @@ NTSTATUS WINAPI RtlDestroyQueryDebugBuffer(IN PDEBUG_BUFFER iBuf)
|
|||
NTSTATUS nts = STATUS_SUCCESS;
|
||||
FIXME("(%p): stub\n", iBuf);
|
||||
if (NULL != iBuf) {
|
||||
if (NULL != iBuf->ModuleInformation) RtlFreeHeap(GetProcessHeap(), 0, iBuf->ModuleInformation);
|
||||
if (NULL != iBuf->HeapInformation) RtlFreeHeap(GetProcessHeap(), 0, iBuf->HeapInformation);
|
||||
if (NULL != iBuf->LockInformation) RtlFreeHeap(GetProcessHeap(), 0, iBuf->LockInformation);
|
||||
RtlFreeHeap(GetProcessHeap(), 0, iBuf->ModuleInformation);
|
||||
RtlFreeHeap(GetProcessHeap(), 0, iBuf->HeapInformation);
|
||||
RtlFreeHeap(GetProcessHeap(), 0, iBuf->LockInformation);
|
||||
RtlFreeHeap(GetProcessHeap(), 0, iBuf);
|
||||
}
|
||||
return nts;
|
||||
|
|
|
@ -345,8 +345,7 @@ NTSTATUS WINAPI RtlpNtEnumerateSubKey( HANDLE handle, UNICODE_STRING *out, ULONG
|
|||
}
|
||||
}
|
||||
|
||||
if (info)
|
||||
RtlFreeHeap( GetProcessHeap(), 0, info );
|
||||
RtlFreeHeap( GetProcessHeap(), 0, info );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -470,7 +470,7 @@ error:
|
|||
SIZE_T size = 0;
|
||||
NtFreeVirtualMemory( NtCurrentProcess(), &addr, &size, MEM_RELEASE );
|
||||
}
|
||||
if (info) RtlFreeHeap( GetProcessHeap(), 0, info );
|
||||
RtlFreeHeap( GetProcessHeap(), 0, info );
|
||||
if (handle) NtClose( handle );
|
||||
close( request_pipe[1] );
|
||||
return status;
|
||||
|
|
Loading…
Reference in New Issue