summaryrefslogtreecommitdiff
path: root/lib/command_match.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@users.noreply.github.com>2017-01-24 21:16:23 -0500
committerGitHub <noreply@github.com>2017-01-24 21:16:23 -0500
commit9ffaae7a4f175db9f2ad907d2f423c24277bbf70 (patch)
treec0e48ac257605cd47d80f79dcdd8a9555aaef322 /lib/command_match.c
parentac9ddce37d16af4e36c1ff945c12aaaf615e69d8 (diff)
parent83364d20d5667c3b43e1e672d2166c22b6fd8cf5 (diff)
Merge pull request #114 from opensourcerouting/parser-mtypes
lib: parser: fix memory management
Diffstat (limited to 'lib/command_match.c')
-rw-r--r--lib/command_match.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/command_match.c b/lib/command_match.c
index d228563240..aa58313134 100644
--- a/lib/command_match.c
+++ b/lib/command_match.c
@@ -27,7 +27,6 @@
#include "command_match.h"
#include "memory.h"
-DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command Tokens")
DEFINE_MTYPE_STATIC(LIB, CMD_MATCHSTACK, "Command Match Stack")
#define MAXDEPTH 64
@@ -322,7 +321,7 @@ command_match_r (struct graph_node *start, vector vline, unsigned int n,
// copy token, set arg and prepend to currbest
struct cmd_token *token = start->data;
struct cmd_token *copy = copy_cmd_token (token);
- copy->arg = XSTRDUP (MTYPE_CMD_TOKENS, input_token);
+ copy->arg = XSTRDUP (MTYPE_CMD_ARG, input_token);
listnode_add_before (currbest, currbest->head, copy);
matcher_rv = MATCHER_OK;
}