diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-09-28 12:39:22 -0600 |
---|---|---|
committer | Jon Loeliger <jdl@jdl.com> | 2012-09-28 15:34:41 -0500 |
commit | 317a5d92bc357aba2c993ee78b4c089b7539fcc6 (patch) | |
tree | 3a932aec86c10bc006f73c236ad17d3f920725bb | |
parent | 1b6d1941dc5b589632c254ee6e960404d7cef5f2 (diff) | |
download | dtc-317a5d92bc357aba2c993ee78b4c089b7539fcc6.tar.gz |
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@nvidia.com>
-rw-r--r-- | livetree.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |