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>
This commit is contained in:
parent
1b6d1941dc
commit
317a5d92bc
1 changed files with 1 additions and 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;
|
||||
|
|
Loading…
Reference in a new issue