From 034b889e4d08409d211fb843cf08a8d07faca4f7 Mon Sep 17 00:00:00 2001 From: Thomas Rosenstein Date: Tue, 12 Feb 2019 16:58:38 +0100 Subject: [Fix #1972] Fix returning of double list size, half nil values --- pkg/server/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/server/server.go b/pkg/server/server.go index cd78f3fb..8b53a7a8 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -3125,7 +3125,7 @@ func (s *BgpServer) ListStatement(ctx context.Context, r *api.ListStatementReque var l []*api.Statement s.mgmtOperation(func() error { s := s.policy.GetStatement(r.Name) - l = make([]*api.Statement, len(s)) + l = make([]*api.Statement, 0, len(s)) for _, st := range s { l = append(l, toStatementApi(st)) } -- cgit v1.2.3