diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-02-28 11:31:00 +0400 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2023-03-01 18:43:15 +1100 |
commit | 083ab26da83bf5d14df5733e3b9954a0881f9ecc (patch) | |
tree | 3843b7ceaf95f6fa78f5fc70cd9c4327211950da /tests/check_path.c | |
parent | 6f8b28f496093156ae126b434ed753094943da03 (diff) | |
download | device-tree-compiler-083ab26da83bf5d14df5733e3b9954a0881f9ecc.tar.gz |
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>
Diffstat (limited to 'tests/check_path.c')
-rw-r--r-- | tests/check_path.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/check_path.c b/tests/check_path.c index cc9757a..c3ae15d 100644 --- a/tests/check_path.c +++ b/tests/check_path.c @@ -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; } |