]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: oss: Release temporary buffers upon errors
authorTakashi Iwai <tiwai@suse.de>
Fri, 18 Mar 2022 08:21:57 +0000 (09:21 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 18 Mar 2022 13:01:28 +0000 (14:01 +0100)
commit3553baca6b9a51510b58fc4cd185f1dccba0b8cf
treedd6585959eaf89354bc9f12b72c4bd2a45dd43e2
parentaeaaae7aa9dcaab3fc5d74e540e9386d3834dbc9
ALSA: oss: Release temporary buffers upon errors

When the parameter changes fails, we don't need to keep the old
temporary buffers.  Release those (and plugin instances) upon errors
for reducing dead memory footprint.  Since we always call it at the
exit of snd_pcm_oss_changes_params_locked(), the explicit calls of
snd_pcm_oss_plugin_clear() can be dropped, too.

Along with it, unify the buffer-free calls to a single helper and call
it from the needed places.

Link: https://lore.kernel.org/r/20220318082157.29769-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/pcm_oss.c