forked from Imagelibrary/rtems
cpukit/fdt: Free index before container
Ensure that the index is released before the structure containing it is freed and NULLed. Updates #4460
This commit is contained in:
committed by
Joel Sherrill
parent
584f5bc9af
commit
3af84c1bea
@@ -700,14 +700,14 @@ rtems_fdt_unload (rtems_fdt_handle* handle)
|
||||
|
||||
rtems_chain_extract_unprotected (&handle->blob->node);
|
||||
|
||||
rtems_fdt_release_index(&handle->blob->index);
|
||||
|
||||
free (handle->blob);
|
||||
|
||||
handle->blob = NULL;
|
||||
|
||||
rtems_fdt_unlock (fdt);
|
||||
|
||||
rtems_fdt_release_index(&handle->blob->index);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user