Commit de463379 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Cai Xinchen
Browse files

tty: serial: 8250: serial_cs: Fix a memory leak in error handling path

stable inclusion
from stable-v4.19.198
commit cddee5c287e26f6b2ba5c0ffdfc3a846f2f10461
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9S6TL
CVE: CVE-2021-47330

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



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

[ Upstream commit fad92b11 ]

In the probe function, if the final 'serial_config()' fails, 'info' is
leaking.

Add a resource handling path to free this memory.

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/dc25f96b7faebf42e60fe8d02963c941cf4d8124.1621971720.git.christophe.jaillet@wanadoo.fr


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarCai Xinchen <caixinchen1@huawei.com>
parent 03933bd1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment