diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-09-08 21:07:55 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-09-08 21:07:55 +0000 |
| commit | fe2e10e8d85990079da100fa0e2646a436cf3602 (patch) | |
| tree | 05bf0d9166cebe6c816e3f4cda3d6d25dab28792 /lib/command_parse.y | |
| parent | ff35126c0661e4b869f3c4782c02605a7f226e18 (diff) | |
lib: Fix uninitialized pointer segfault
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command_parse.y')
| -rw-r--r-- | lib/command_parse.y | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/command_parse.y b/lib/command_parse.y index 1ee5afc65e..a5d391d19e 100644 --- a/lib/command_parse.y +++ b/lib/command_parse.y @@ -453,13 +453,7 @@ doc_next() static struct graph_node * new_token_node (struct graph *graph, enum cmd_token_type_t type, char *text, char *doc) { - struct cmd_token_t *token = - XMALLOC (MTYPE_CMD_TOKENS, sizeof (struct cmd_token_t)); - - token->type = type; - token->text = text; - token->desc = doc; - + struct cmd_token_t *token = new_cmd_token (type, text, doc); return graph_new_node (graph, token, (void (*)(void *)) &del_cmd_token); } |
