]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit9a106c36a637621321be6bfdad7b1733c2048a01
tree5f4fa413d6e60a1385e950e24b81fab49f956c3c
parent66960b6dac28221c7198a7b90e1f0336f27568c6
thunderbolt: property: Fix a NULL pointer dereference

BugLink: https://bugs.launchpad.net/bugs/1838700
[ 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: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/thunderbolt/property.c