From: Peter Meerwald
Date: Wed, 18 Dec 2013 16:27:47 +0000 (+0100)
Subject: core: Fix check for io->output_event in enable_events()
X-Git-Url: https://code.delx.au/pulseaudio/commitdiff_plain/25101b299dde374ae09b79f03a3b393b37981eda
core: Fix check for io->output_event in enable_events()
copy-pase error discovered by coverity
Signed-off-by: Peter Meerwald
---
diff --git a/src/pulsecore/iochannel.c b/src/pulsecore/iochannel.c
index ca0f3502..dce67340 100644
--- a/src/pulsecore/iochannel.c
+++ b/src/pulsecore/iochannel.c
@@ -119,7 +119,7 @@ static void enable_events(pa_iochannel *io) {
io->mainloop->io_enable(io->output_event, PA_IO_EVENT_OUTPUT);
else
io->output_event = io->mainloop->io_new(io->mainloop, io->ofd, PA_IO_EVENT_OUTPUT, callback, io);
- } else if (io->input_event) {
+ } else if (io->output_event) {
io->mainloop->io_free(io->output_event);
io->output_event = NULL;
}