mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
tests: fix leaks spotted by ASAN
Always allocate from open_blob_rw(), to simplify memory management. The fixes are not exhaustive. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
6f8b28f496
commit
083ab26da8
10 changed files with 25 additions and 21 deletions
|
@ -32,6 +32,7 @@ static void *open_dt(char *path)
|
|||
* Resize our DTs to 4k so that we have room to operate on
|
||||
*/
|
||||
CHECK(fdt_open_into(dt, copy, FDT_COPY_SIZE));
|
||||
free(dt);
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue