commands: of_property: copy value instead of resizing
Commit 748d1b8 adds the fixup feature to the above command. With this commit an
unwanted free(data) on the freshly set property value is done if someone tries
to set the value of an already present property (not the case for a new
property). Furthermore in fixup mode the pointer fixup->data is freed when the
fixup function is called more than once. This leads to a hanging system after
calling of_dump -F many times.
Fix this issues by copying the data to a new allocated memory area like a new
property is created.

Signed-off-by: Oleg Karfich <oleg.karfich@wago.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 7daba42 commit 06e9ae9b109f0748d0cfa4c7fa35dc904a367f56
@Oleg.Karfich@wago.com Oleg.Karfich@wago.com authored on 28 Aug 2018
Sascha Hauer committed on 29 Aug 2018
Showing 1 changed file
View
commands/of_property.c