From d05e31316cd5313e1dfba11bdcb1957d5855bc02 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Sat, 13 Feb 2021 22:48:52 +0100 Subject: Add missing early returns in compat API [NO TESTS NEEDED] Signed-off-by: Riyad Preukschas Signed-off-by: Matthew Heon --- pkg/api/handlers/compat/containers_create.go | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/api/handlers/compat/containers_create.go') diff --git a/pkg/api/handlers/compat/containers_create.go b/pkg/api/handlers/compat/containers_create.go index 6e85872b2..4a39e9563 100644 --- a/pkg/api/handlers/compat/containers_create.go +++ b/pkg/api/handlers/compat/containers_create.go @@ -47,6 +47,7 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) { rtc, err := runtime.GetConfig() if err != nil { utils.Error(w, "unable to obtain runtime config", http.StatusInternalServerError, errors.Wrap(err, "unable to get runtime config")) + return } newImage, err := runtime.ImageRuntime().NewFromLocal(body.Config.Image) -- cgit v1.2.3-54-g00ecf