Skip to content
Commit e7694cb6 authored by Zhang Qilong's avatar Zhang Qilong Committed by Greg Kroah-Hartman
Browse files

usb: gadget: f_midi: Fix memleak in f_midi_alloc



In the error path, if midi is not null, we should
free the midi->id if necessary to prevent memleak.

Fixes: b85e9de9 ("usb: gadget: f_midi: convert to new function interface with backward compatibility")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarZhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20201117021629.1470544-2-zhangqilong3@huawei.com


Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9ca57518
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