diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2019-05-09 19:41:20 +1000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-05-10 11:53:10 +1000 |
commit | 228a44cce857feeae55362a0c95689bc82123ed6 (patch) | |
tree | b6f75540c59026bec3fec3c80a98188b6e8fbb89 /tests/fs_tree1.c | |
parent | 8f695676227be42074711f3464d8c9f82bd80999 (diff) | |
download | dtc-228a44cce857feeae55362a0c95689bc82123ed6.zip dtc-228a44cce857feeae55362a0c95689bc82123ed6.tar.gz dtc-228a44cce857feeae55362a0c95689bc82123ed6.tar.bz2 |
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>
Diffstat (limited to 'tests/fs_tree1.c')
0 files changed, 0 insertions, 0 deletions