]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: aloop: Release cable upon open error path
authorTakashi Iwai <tiwai@suse.de>
Fri, 5 Jan 2018 15:09:47 +0000 (16:09 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 5 Jan 2018 15:22:20 +0000 (16:22 +0100)
commit8630ed1b416ce20d0914eb70d1f20cb184784d1b
tree652ff2b454109ec274639e6ec05825c8601604b7
parent670a052a29d516263be20d0a5bb8ef7ee5226429
ALSA: aloop: Release cable upon open error path

The aloop runtime object and its assignment in the cable are left even
when opening a substream fails.  This doesn't mean any memory leak,
but it still keeps the invalid pointer that may be referred by the
another side of the cable spontaneously, which is a potential Oops
cause.

Clean up the cable assignment and the empty cable upon the error path
properly.

Fixes: 47128b1deae6 ("ALSA: introduce the snd-aloop module for the PCM loopback")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/drivers/aloop.c