OSDN Git Service

thunderbolt: property: Fix a NULL pointer dereference
authorKangjie Lu <kjlu@umn.edu>
Tue, 12 Mar 2019 08:33:28 +0000 (03:33 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:46:31 +0000 (06:46 -0700)
commit495e34e62c3be4e1f4c53892db8aec62832fe6b5
treee3886f307da41ea024b424e988be2c9755e0b900
parent70611b1b81c4ec8ce99d3c00107e89697ec1f495
thunderbolt: property: Fix a NULL pointer dereference

[ 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>
drivers/thunderbolt/property.c