summaryrefslogtreecommitdiffstats
path: root/src/k8splugin/internal/namegenerator/namegenerator.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/k8splugin/internal/namegenerator/namegenerator.go')
-rw-r--r--src/k8splugin/internal/namegenerator/namegenerator.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/k8splugin/internal/namegenerator/namegenerator.go b/src/k8splugin/internal/namegenerator/namegenerator.go
index 0a49633a..8eb89546 100644
--- a/src/k8splugin/internal/namegenerator/namegenerator.go
+++ b/src/k8splugin/internal/namegenerator/namegenerator.go
@@ -142,6 +142,9 @@ func (c *cache) generateName() string {
}
func (c *cache) releaseName(name string) {
+ if name == "" {
+ return
+ }
c.mux.Lock()
defer c.mux.Unlock()