Commit a7e98a85 authored by Zichen Xie's avatar Zichen Xie Committed by Greg Kroah-Hartman
Browse files

samples/landlock: Fix possible NULL dereference in parse_path()



[ Upstream commit 078bf943 ]

malloc() may return NULL, leading to NULL dereference.  Add a NULL
check.

Fixes: ba84b0bf ("samples/landlock: Add a sandbox manager example")
Signed-off-by: default avatarZichen Xie <zichenxie0106@gmail.com>
Link: https://lore.kernel.org/r/20241128032955.11711-1-zichenxie0106@gmail.com


[mic: Simplify fix]
Signed-off-by: default avatarMickaël Salaün <mic@digikod.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 332ee5fc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment