From 70158284b70b8826bcfdbf6f9a56bed5633b8123 Mon Sep 17 00:00:00 2001 From: Albin Kerouanton Date: Wed, 25 Oct 2023 09:40:18 +0200 Subject: [PATCH] api: fix a nil check on the wrong var Signed-off-by: Albin Kerouanton --- api/server/router/container/container_routes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/server/router/container/container_routes.go b/api/server/router/container/container_routes.go index 530d2168e5..9758886534 100644 --- a/api/server/router/container/container_routes.go +++ b/api/server/router/container/container_routes.go @@ -544,7 +544,7 @@ func (s *containerRouter) postContainersCreate(ctx context.Context, w http.Respo } } - if hostConfig != nil && versions.LessThan(version, "1.44") { + if config != nil && versions.LessThan(version, "1.44") { if config.Healthcheck != nil { // StartInterval was added in API 1.44 config.Healthcheck.StartInterval = 0