summaryrefslogtreecommitdiff
path: root/lib/command_match.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2016-12-20 03:12:32 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2016-12-20 03:26:47 +0000
commitc01d03a6587b18722e5a7381084591e01eca64b5 (patch)
tree2a55fb6589e8cbd63e266855d627d93731a62b48 /lib/command_match.c
parent96133092e02c7b07c9e4c6d3e26b871551fa0cef (diff)
bgpd, lib: fix a few scan-build catches
Fixes a couple null pointer derefs and uninit'd values. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/command_match.c')
-rw-r--r--lib/command_match.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/command_match.c b/lib/command_match.c
index 62905a4f7f..d228563240 100644
--- a/lib/command_match.c
+++ b/lib/command_match.c
@@ -482,7 +482,7 @@ add_nexthops (struct list *list, struct graph_node *node,
child = vector_slot (node->to, i);
size_t j;
struct cmd_token *token = child->data;
- if (!token->allowrepeat)
+ if (!token->allowrepeat && stack)
{
for (j = 0; j < stackpos; j++)
if (child == stack[j])