• Takashi Iwai's avatar
    ALSA: aloop: Release cable upon open error path · 9685347a
    Takashi Iwai authored
    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: 597603d6 ("ALSA: introduce the snd-aloop module for the PCM loopback")
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    9685347a
aloop.c 35.6 KB