]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Sep 2019 08:23:35 +0000 (10:23 +0200)
commit441f5ecc1e24afa38ec2a1538a9470efb51c3dc1
treea819687f6d54f3c51cf7f4a16deea449aeafc9fc
parent6ff7b2c68d2276f26ebfa8edc7dc9c0591b66b1a
ALSA: line6: Fix memory leak at line6_init_pcm() error path

commit 1bc8d18c75fef3b478dbdfef722aae09e2a9fde7 upstream.

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: 3450121997ce ("ALSA: line6: Fix write on zero-sized buffer")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/usb/line6/pcm.c