[HUST CSE]Assign Null to fdt after free to avoid dangling pointer (#7389)
This commit is contained in:
parent
4b2a44f39e
commit
8dfcf07c24
|
@ -52,6 +52,7 @@ void *dtb_node_load_from_fs(char *dtb_filename)
|
|||
if (dtb_node_check(fdt) == RT_FALSE)
|
||||
{
|
||||
free(fdt);
|
||||
fdt=NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue