From: Lennart Poettering Date: Thu, 25 Sep 2008 19:02:32 +0000 (+0200) Subject: pulse - Fix destruction order on failure X-Git-Tag: v1.0.18~3 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=ae975f9c06e429da9dc8821367d775a25af69fbb;p=alsa-plugins.git 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 --- 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;