]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: line6: Fix memory leak at line6_init_pcm() error path
authorTakashi Iwai <tiwai@suse.de>
Wed, 21 Aug 2019 18:00:02 +0000 (20:00 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 21 Aug 2019 18:00:02 +0000 (20:00 +0200)
commit6a907ed96a7bc3d5fb4f32f9bbbf0dead7096790
tree2929483196823ee8c65f0148f5a27d486a961fdb
parent4dc00c13c0bc052a108f08bf4e64cbe992674ffc
ALSA: line6: Fix memory leak at line6_init_pcm() error path

I forgot to release the allocated object at the early error path in
line6_init_pcm().  For addressing it, slightly shuffle the code so
that the PCM destructor (pcm->private_free) is assigned properly
before all error paths.

Fixes: 694018b5ae9b ("ALSA: line6: Fix write on zero-sized buffer")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/line6/pcm.c