Commit ee7b8465 authored by Pavel Skripkin's avatar Pavel Skripkin Committed by Liu Jian
Browse files

net: caif: fix memory leak in cfusbl_device_notify

stable inclusion
from stable-v4.19.194
commit 9ea0ab48e755d8f29fe89eb235fb86176fdb597f
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I990B2
CVE: CVE-2021-47121

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9ea0ab48e755d8f29fe89eb235fb86176fdb597f



---------------------------

commit 7f5d8666 upstream.

In case of caif_enroll_dev() fail, allocated
link_support won't be assigned to the corresponding
structure. So simply free allocated pointer in case
of error.

Fixes: 7ad65bf6 ("caif: Add support for CAIF over CDC NCM USB interface")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarPavel Skripkin <paskripkin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarLiu Jian <liujian56@huawei.com>
parent d22a0056
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment