diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-08-03 19:49:02 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2016-08-03 19:49:02 +0000 |
| commit | 8aeffd7ae1aac2552f67aa8b2c7708b4d41c4d55 (patch) | |
| tree | 50b636bdfb490fa958b58ad372dcb6140779da2f /lib/command_match.c | |
| parent | 6ce82b63cd35eac37a4ddf1d0253342d5160b7af (diff) | |
lib: Fix use after free in matcher
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command_match.c')
| -rw-r--r-- | lib/command_match.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/command_match.c b/lib/command_match.c index 5ba1c1b6e7..305e3b1a68 100644 --- a/lib/command_match.c +++ b/lib/command_match.c @@ -272,14 +272,15 @@ match_command_complete (struct graph_node *start, const char *line) * current = set of all transitions from the previous input token * next = set of all nodes reachable from all nodes in `matched` */ - list_free (current); - cmd_free_strvec(vline); matcher_result_value = idx + 1 == vector_active(vline) && next->count ? MATCHER_OK : MATCHER_NO_MATCH; + list_free (current); + cmd_free_strvec(vline); + return next; } |
