From 3b84117f54669273f8f1f82fdbfd3a578576d515 Mon Sep 17 00:00:00 2001 From: Joe Betz Date: Fri, 25 May 2018 13:59:37 -0700 Subject: [PATCH] clientv3/integration: Add err check to TestDialTLSNoConfig to prevent nil pointer dereference on c.Close() --- clientv3/integration/dial_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clientv3/integration/dial_test.go b/clientv3/integration/dial_test.go index 41c1387b9..e996a132b 100644 --- a/clientv3/integration/dial_test.go +++ b/clientv3/integration/dial_test.go @@ -79,6 +79,9 @@ func TestDialTLSNoConfig(t *testing.T) { DialTimeout: time.Second, DialOptions: []grpc.DialOption{grpc.WithBlock()}, }) + if err != nil { + t.Fatal(err) + } defer c.Close() // TODO: this should not be required when we set grpc.WithBlock()