summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/device_tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/device_tree.c b/src/lib/device_tree.c
index fb3ce905bf..b846c25783 100644
--- a/src/lib/device_tree.c
+++ b/src/lib/device_tree.c
@@ -554,7 +554,7 @@ struct device_tree_node *dt_find_node(struct device_tree_node *parent,
if (!create)
return NULL;
- found = malloc(sizeof(*found));
+ found = calloc(1, sizeof(*found));
if (!found)
return NULL;
found->name = strdup(*path);