platform_external_dtc/libfdt
Nicholas Piggin 228a44cce8 libfdt: Ensure fdt_add_property frees allocated name string on failure
If fdt_add_property or fdt_property_placeholder fail after allocating
a string for the name, they return without freeing that string. This
does not change the structure of the tree, but in very specific cases
it could lead to undesirable space consumption.

Fix this by rolling back the string allocation in this situation.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-Id: <20190509094122.834-2-npiggin@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-05-10 11:53:10 +10:00
..
.gitignore Link tools and tests against libfdt shared library 2019-03-29 17:20:16 +11:00
fdt.c libfdt: Add fdt_header_size() 2018-06-07 11:49:14 +10:00
fdt.h libfdt: Remove leading underscores from identifiers 2017-10-26 09:25:14 +02:00
fdt_addresses.c libfdt: add fdt_append_addrrange() 2019-03-29 12:12:29 +11:00
fdt_empty_tree.c Fix a few whitespace and style nits 2017-04-09 20:56:37 +10:00
fdt_overlay.c libfdt: Use fdt_find_max_phandle() 2019-03-29 13:31:16 +11:00
fdt_ro.c libfdt: Make fdt_get_max_phandle() an inline 2019-03-29 13:59:04 +11:00
fdt_rw.c libfdt: Ensure fdt_add_property frees allocated name string on failure 2019-05-10 11:53:10 +10:00
fdt_strerror.c libfdt: add missing errors to fdt_strerror() 2016-11-04 07:17:20 +11:00
fdt_sw.c libfdt: Ensure fdt_add_property frees allocated name string on failure 2019-05-10 11:53:10 +10:00
fdt_wip.c libfdt: Remove leading underscores from identifiers 2017-10-26 09:25:14 +02:00
libfdt.h libfdt: Make fdt_get_max_phandle() an inline 2019-03-29 13:59:04 +11:00
libfdt_env.h libfdt: Add new maximum phandle lookup function 2019-03-29 13:29:51 +11:00
libfdt_internal.h libfdt: Clean up header checking functions 2018-06-07 11:45:44 +10:00
Makefile.libfdt Link tools and tests against libfdt shared library 2019-03-29 17:20:16 +11:00
TODO dtc: Update TODO files 2007-12-19 08:20:26 -06:00
version.lds Link tools and tests against libfdt shared library 2019-03-29 17:20:16 +11:00