Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit e67d64e8 authored by Hemant Kumar's avatar Hemant Kumar
Browse files

sound: usb: Fix use after free in driver probe



In case of an error condition snd_card_free() is called
if chip->num_interfaces is zero. snd_card_free() frees
chip instance by calling snd_usb_audio_free(). chip->active
is being decremented after freeing chip instance resulting
into use after free. Hence decrement chip->active only if
chip->num_interfaces is non-zero.

Change-Id: I74784cab930bf9d74432226f8a0db33cfb869b30
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent c7aa41f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment