From ae975f9c06e429da9dc8821367d775a25af69fbb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 25 Sep 2008 21:02:32 +0200 Subject: pulse - Fix destruction order on failure If we failure we should make sure the event loop thread is not running and hence not accessing our source/sink strings before we free those strings. Signed-off-by: Takashi Iwai --- pulse/ctl_pulse.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pulse/ctl_pulse.c b/pulse/ctl_pulse.c index 0b10628..8a5546c 100644 --- a/pulse/ctl_pulse.c +++ b/pulse/ctl_pulse.c @@ -728,14 +728,11 @@ SND_CTL_PLUGIN_DEFINE_FUNC(pulse) return 0; error: - if (ctl->source) - free(ctl->source); - if (ctl->sink) - free(ctl->sink); - if (ctl->p) pulse_free(ctl->p); + free(ctl->source); + free(ctl->sink); free(ctl); return err; -- cgit