]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
thunderbolt: property: Fix a NULL pointer dereference
authorKangjie Lu <kjlu@umn.edu>
Tue, 12 Mar 2019 08:33:28 +0000 (03:33 -0500)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 13 Aug 2019 12:11:36 +0000 (14:11 +0200)
commit78720c43d0363726fc1eff36450b9ee52fdef4d4
tree8c3034db28efd48a012a65a45e264940ee11f954
parent6d45fd2dc24e0daf5571690170a8bfa3a6007de9
thunderbolt: property: Fix a NULL pointer dereference

BugLink: https://bugs.launchpad.net/bugs/1837517
[ Upstream commit 106204b56f60abf1bead7dceb88f2be3e34433da ]

In case kzalloc fails, the fix releases resources and returns
-ENOMEM to avoid the NULL pointer dereference.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/thunderbolt/property.c