From 34b0161d02a6e8f115d7c671603e81789d34e801 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Wed, 25 Apr 2007 01:13:43 +0200 Subject: [PATCH] winealsa: Do not check for non-NULL before HeapFree'ing a variable as the check is redundant. --- dlls/winealsa.drv/mixer.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dlls/winealsa.drv/mixer.c b/dlls/winealsa.drv/mixer.c index 4a39d2b22b..84701f612b 100644 --- a/dlls/winealsa.drv/mixer.c +++ b/dlls/winealsa.drv/mixer.c @@ -505,10 +505,8 @@ static void ALSA_MixerInit(void) eclose: WARN("Error occured initialising mixer: %s\n", snd_strerror(err)); - if (mixdev[mixnum].lines) - HeapFree(GetProcessHeap(), 0, mixdev[mixnum].lines); - if (mixdev[mixnum].controls) - HeapFree(GetProcessHeap(), 0, mixdev[mixnum].controls); + HeapFree(GetProcessHeap(), 0, mixdev[mixnum].lines); + HeapFree(GetProcessHeap(), 0, mixdev[mixnum].controls); snd_mixer_close(mixdev[mixnum].mix); } cards = mixnum; @@ -649,8 +647,7 @@ static DWORD WINAPI ALSA_MixerPollThread(LPVOID lParam) die: TRACE("Shutting down\n"); - if (pfds) - HeapFree(GetProcessHeap(), 0, pfds); + HeapFree(GetProcessHeap(), 0, pfds); y = read(msg_pipe[0], &x, sizeof(x)); close(msg_pipe[1]);