]> git.alsa-project.org Git - alsa-plugins.git/commit
a52: Fix leaks when a52_set_hw_constraint() fails
authorAndre Guedes <andre.guedes@intel.com>
Fri, 28 Sep 2018 21:27:24 +0000 (14:27 -0700)
committerTakashi Iwai <tiwai@suse.de>
Tue, 2 Oct 2018 15:54:13 +0000 (17:54 +0200)
commitfc3f5d51062ff438780e568995792dc809c908cc
treeb0ed2393f000d5dd89c3713ed173f05e41e48bdc
parent3493e66e2e6e0245e6cff0816f3487c322639835
a52: Fix leaks when a52_set_hw_constraint() fails

If a52_set_hw_constraint() returns error, we leak 'rec' and
'rec->slave'. 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>
a52/pcm_a52.c