Skip to content
Commit c847cb74 authored by Bas van Loon's avatar Bas van Loon Committed by Anas Nashif
Browse files

fs/ext2: Fix NULL dereference when fs_stat queries root.

When fs_stat() queries the root / mountpoint it should return its root
i_node but instead it tries to return the parent i_node which does not
exist. Fix this by checking if parent is set otherwise return the root
i_node.

Fixes https://github.com/zephyrproject-rtos/zephyr/issues/94000

.

Signed-off-by: default avatarBas van Loon <bas@arch-embedded.com>
(cherry picked from commit 1dcf123e)
parent cccd5048
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment