]> git.alsa-project.org Git - alsa-plugins.git/commit
pulse: prevent double-free when pulse_hw_constraint returns error
authorKui Wang <wangkuisuper@hotmail.com>
Thu, 13 Jul 2017 19:33:05 +0000 (19:33 +0000)
committerTakashi Iwai <tiwai@suse.de>
Sat, 15 Jul 2017 07:48:36 +0000 (09:48 +0200)
commitc96e167bcedfb91526780f7da86fc0872017119d
tree12300291dc7754c7e09ec9b619e91124a1364624
parent258832b340a2ad585e6a130e2d3d5d3d5e882888
pulse: prevent double-free when pulse_hw_constraint returns error

When pulse_hw_constraint returns error, snd_pcm_ioplug_delete() is called.
It will then call pulse_close() where "snd_pcm_pulse_t *pcm" will be free.
Then if goto the "error" label, the "snd_pcm_pulse_t *pcm" will be double-free.

To prevent this, just jump over the code which might cause double-free.

Signed-off-by: Kui Wang <wangkuisuper@hotmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
pulse/pcm_pulse.c