From d778845791bfdb6c53d7baaf1adad1863f022ab6 Mon Sep 17 00:00:00 2001 From: Alessandro Boch Date: Sun, 22 Nov 2015 21:44:06 -0800 Subject: [PATCH] Fix in endpoint Info() method - Make sure to return the proper value for the EndpointInfo interface in case of nil implementer Signed-off-by: Alessandro Boch --- libnetwork/endpoint_info.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libnetwork/endpoint_info.go b/libnetwork/endpoint_info.go index db23eb738f..1028308557 100644 --- a/libnetwork/endpoint_info.go +++ b/libnetwork/endpoint_info.go @@ -159,7 +159,11 @@ func (ep *endpoint) Info() EndpointInfo { return ep } - return sb.getEndpoint(ep.ID()) + if epi := sb.getEndpoint(ep.ID()); epi != nil { + return epi + } + + return nil } func (ep *endpoint) DriverInfo() (map[string]interface{}, error) {