summaryrefslogtreecommitdiffhomepage
path: root/table
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-03-09 06:35:32 -0800
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-03-09 06:35:32 -0800
commit9e773aa3e19785189e330d9742b3375cfedf096b (patch)
treef81c94af2bad35a75c56c956c662ac13d825459b /table
parent0561c11889edab709a51fff7dc82bf25044f51bb (diff)
policy: fix crash to remove statement from policy without statements
https://github.com/osrg/gobgp/issues/754 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table')
-rw-r--r--table/policy.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/table/policy.go b/table/policy.go
index 20ae16cd..2e0550c6 100644
--- a/table/policy.go
+++ b/table/policy.go
@@ -2489,7 +2489,7 @@ func (lhs *Policy) Add(rhs *Policy) error {
}
func (lhs *Policy) Remove(rhs *Policy) error {
- stmts := make([]*Statement, 0, len(lhs.Statements)-len(rhs.Statements))
+ stmts := make([]*Statement, 0, len(lhs.Statements))
for _, x := range lhs.Statements {
found := false
for _, y := range rhs.Statements {