From 96b50dd4c42d26d47f184b478237b6e402c245a6 Mon Sep 17 00:00:00 2001 From: shashidharatd Date: Mon, 15 Oct 2018 11:43:19 +0530 Subject: [PATCH] Fix nil map access of endpoint labels --- registry/txt.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/registry/txt.go b/registry/txt.go index 917588ef18..5289308508 100644 --- a/registry/txt.go +++ b/registry/txt.go @@ -98,13 +98,11 @@ func (im *TXTRegistry) Records() ([]*endpoint.Endpoint, error) { } for _, ep := range endpoints { + ep.Labels = endpoint.NewLabels() if labels, ok := labelMap[ep.DNSName]; ok { for k, v := range labels { ep.Labels[k] = v } - } else { - //this indicates that owner could not be identified, as there is no corresponding TXT record - ep.Labels = endpoint.NewLabels() } }