diff --git a/dlls/kernel/sync.c b/dlls/kernel/sync.c index cec44f5d8a..8c43e5347c 100644 --- a/dlls/kernel/sync.c +++ b/dlls/kernel/sync.c @@ -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; } diff --git a/dlls/ntdll/debugbuffer.c b/dlls/ntdll/debugbuffer.c index 600c7faacf..424b112ed8 100644 --- a/dlls/ntdll/debugbuffer.c +++ b/dlls/ntdll/debugbuffer.c @@ -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; diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index aa5a6ab136..e3266c567b 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -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; } diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 67e69301a3..efe2a46f6a 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -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;