]> git.alsa-project.org Git - alsa-plugins.git/commit
oss: Fix leaks when oss_hw_constraint() fails
authorAndre Guedes <andre.guedes@intel.com>
Fri, 28 Sep 2018 21:27:26 +0000 (14:27 -0700)
committerTakashi Iwai <tiwai@suse.de>
Tue, 2 Oct 2018 15:54:51 +0000 (17:54 +0200)
commitb8bcd458b79146547fc6dae1645832695545da44
tree7f9826dd20a1ed0ae7f240b129744f235404e100
parentf4746667a4a2490f17c2a82b6f421bc3c9bd6de8
oss: Fix leaks when oss_hw_constraint() fails

If oss_hw_constraint() returns error, we leak 'oss' object and all the
resources referenced by it. This patch fixes the issue by jumping to
'error' label where the proper clean up is already done.

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>
oss/pcm_oss.c