From aec715653aacf9aa02f33598223e647c793c29c9 Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Wed, 10 May 2017 16:25:32 +0000 Subject: [PATCH] Avoid null dereferences in ECS client (encore) --- probe/awsecs/client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/probe/awsecs/client.go b/probe/awsecs/client.go index 3c707339dd..e97f7e6d69 100644 --- a/probe/awsecs/client.go +++ b/probe/awsecs/client.go @@ -209,7 +209,9 @@ func (c ecsClientImpl) describeServicesBatch(names []string) { } for _, service := range resp.Services { - c.serviceCache.Set(*service.ServiceName, newECSService(service)) + if service != nil { + c.serviceCache.Set(*service.ServiceName, newECSService(service)) + } } }