summaryrefslogtreecommitdiff
path: root/lib/command_match.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-01-06 19:36:59 -0500
committerGitHub <noreply@github.com>2017-01-06 19:36:59 -0500
commit46c323a66bee2899292885085ec7e7b51be095c3 (patch)
tree6f3d20049b091876659150b806d68d392d5d0394 /lib/command_match.c
parent15667da96d34556edbb6050008fe3ae2f0f75f8e (diff)
parentc01d03a6587b18722e5a7381084591e01eca64b5 (diff)
Merge pull request #27 from qlyoung/fix-derefs2
bgpd, lib: fix a few scan-build catches
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])