diff options
author | Lennart Poettering <mznyfn@0pointer.de> | 2008-09-25 21:02:32 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-09-26 11:47:01 +0200 |
commit | ae975f9c06e429da9dc8821367d775a25af69fbb (patch) | |
tree | f6795628b96c6e00127de909d1e77f939ab926c0 | |
parent | 2180062440a322576a6a382cddfb0e62eae44512 (diff) |
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 <tiwai@suse.de>
-rw-r--r-- | pulse/ctl_pulse.c | 7 |
1 files 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; |