mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
scanner: Check name == NULL for enum entries
From a clang static analysis warning.
This commit is contained in:
parent
3f1063f92a
commit
e742dcc9ed
1 changed files with 3 additions and 0 deletions
|
|
@ -267,6 +267,9 @@ start_element(void *data, const char *element_name, const char **atts)
|
|||
|
||||
ctx->enumeration = enumeration;
|
||||
} else if (strcmp(element_name, "entry") == 0) {
|
||||
if (name == NULL)
|
||||
fail(ctx, "no entry name given");
|
||||
|
||||
entry = malloc(sizeof *entry);
|
||||
entry->name = strdup(name);
|
||||
entry->uppercase_name = uppercase_dup(name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue