summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/of_property.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/commands/of_property.c b/commands/of_property.c
index d0b923f4f2..31e9b71dd7 100644
--- a/commands/of_property.c
+++ b/commands/of_property.c
@@ -270,9 +270,8 @@ static int do_of_property_set_now(struct device_node *root, const char *path,
free(pp->value);
pp->value_const = NULL;
- /* limit property data to the actual size */
if (len)
- pp->value = xrealloc(data, len);
+ pp->value = xmemdup(data, len);
else
pp->value = NULL;