From 23f52fd41b4ebdaeade95cf0bc98b7f7e51f6038 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Mon, 17 Nov 2014 23:31:25 -0800 Subject: [PATCH] ao/wasapi: fix leaked event handles --- audio/out/ao_wasapi.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/audio/out/ao_wasapi.c b/audio/out/ao_wasapi.c index 5b494c4d72..9ee890fe67 100644 --- a/audio/out/ao_wasapi.c +++ b/audio/out/ao_wasapi.c @@ -160,12 +160,11 @@ exit_label: static void closehandles(struct ao *ao) { struct wasapi_state *state = (struct wasapi_state *)ao->priv; - if (state->init_done) - CloseHandle(state->init_done); - if (state->hUninit) - CloseHandle(state->hUninit); - if (state->hFeed) - CloseHandle(state->hFeed); + if (state->init_done) CloseHandle(state->init_done); + if (state->hUninit) CloseHandle(state->hUninit); + if (state->hFeed) CloseHandle(state->hFeed); + if (state->hForceFeed) CloseHandle(state->hForceFeed); + if (state->hFeedDone) CloseHandle(state->hFeedDone); } static void uninit(struct ao *ao)