From d39eb74daa3f09d4dedc18649458ee8ba668d579 Mon Sep 17 00:00:00 2001 From: Erik Grinaker Date: Mon, 4 Jan 2021 14:38:42 +0100 Subject: [PATCH] tools/tm-signer-harness: fix listener leak in newTestHarnessListener() (#5850) Fixes #5837. --- tools/tm-signer-harness/internal/test_harness.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tm-signer-harness/internal/test_harness.go b/tools/tm-signer-harness/internal/test_harness.go index 28a20caed..33ae537fe 100644 --- a/tools/tm-signer-harness/internal/test_harness.go +++ b/tools/tm-signer-harness/internal/test_harness.go @@ -374,6 +374,7 @@ func newTestHarnessListener(logger log.Logger, cfg TestHarnessConfig) (*privval. logger.Info("Resolved TCP address for listener", "addr", tcpLn.Addr()) svln = tcpLn default: + _ = ln.Close() logger.Error("Unsupported protocol (must be unix:// or tcp://)", "proto", proto) return nil, newTestHarnessError(ErrInvalidParameters, nil, fmt.Sprintf("Unsupported protocol: %s", proto)) }