[HUST CSE]Assign Null to fdt after free to avoid dangling pointer (#7389)

This commit is contained in:
OnlyShirley
2023-04-27 07:13:11 +08:00
committed by GitHub
parent 4b2a44f39e
commit 8dfcf07c24

View File

@@ -52,6 +52,7 @@ void *dtb_node_load_from_fs(char *dtb_filename)
if (dtb_node_check(fdt) == RT_FALSE)
{
free(fdt);
fdt=NULL;
}
}