]> git.alsa-project.org Git - alsa-plugins.git/commit
jack: Fix leaks when jack_set_hw_constraint() fails
authorAndre Guedes <andre.guedes@intel.com>
Fri, 28 Sep 2018 21:27:25 +0000 (14:27 -0700)
committerTakashi Iwai <tiwai@suse.de>
Tue, 2 Oct 2018 15:54:30 +0000 (17:54 +0200)
commitf4746667a4a2490f17c2a82b6f421bc3c9bd6de8
treea71c03d357722e2d32d056f15fd021cede0af617
parentfc3f5d51062ff438780e568995792dc809c908cc
jack: Fix leaks when jack_set_hw_constraint() fails

If jack_set_hw_constraint() returns error, we leak the 'jack' object and
all the resources referenced by it. This patch fixes the issue by
calling snd_pcm_jack_free() before returning.

Signed-off-by: Andre Guedes <andre.guedes@intel.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
jack/pcm_jack.c