summaryrefslogtreecommitdiffstats
path: root/hdata
diff options
context:
space:
mode:
Diffstat (limited to 'hdata')
-rw-r--r--hdata/memory.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hdata/memory.c b/hdata/memory.c
index 6bc86959..58acd632 100644
--- a/hdata/memory.c
+++ b/hdata/memory.c
@@ -244,6 +244,10 @@ static void add_size_to_ram_area(struct dt_node *ram_node,
return;
str = zalloc(kwsz + 1);
+ if (!str){
+ prerror("Allocation failed\n");
+ return;
+ }
memcpy(str, kw, kwsz);
dt_add_property_string(ram_node, "size", str);
free(str);
OpenPOWER on IntegriCloud