[Crosstoolchain-logs] [device-tree-compiler] 61/198: dtc: zero out new label objects
Hector Oron
zumbi at moszumanska.debian.org
Thu Dec 8 17:06:53 UTC 2016
This is an automated email from the git hooks/post-receive script.
zumbi pushed a commit to branch upstream/1.4.x
in repository device-tree-compiler.
commit 317a5d92bc357aba2c993ee78b4c089b7539fcc6
Author: Stephen Warren <swarren at nvidia.com>
Date: Fri Sep 28 12:39:22 2012 -0600
dtc: zero out new label objects
Without this, new->deleted may be left set to some random value, which
may then cause future label references to fail to locate the label. The
code that allocates properties and nodes already contains the equivalent
memset().
Signed-off-by: Stephen Warren <swarren at nvidia.com>
---
livetree.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/livetree.c b/livetree.c
index e856662..b61465f 100644
--- a/livetree.c
+++ b/livetree.c
@@ -36,6 +36,7 @@ void add_label(struct label **labels, char *label)
}
new = xmalloc(sizeof(*new));
+ memset(new, 0, sizeof(*new));
new->label = label;
new->next = *labels;
*labels = new;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git
More information about the Crosstoolchain-logs
mailing list