diff options
author | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2021-02-13 22:48:52 +0100 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-02-18 11:15:46 -0500 |
commit | d05e31316cd5313e1dfba11bdcb1957d5855bc02 (patch) | |
tree | 19a8c585046f3b38dcaa73e4b15772f56927d201 | |
parent | 26c1abf72925cfd52d380167487f748f51791533 (diff) | |
download | podman-d05e31316cd5313e1dfba11bdcb1957d5855bc02.tar.gz podman-d05e31316cd5313e1dfba11bdcb1957d5855bc02.tar.bz2 podman-d05e31316cd5313e1dfba11bdcb1957d5855bc02.zip |
Add missing early returns in compat API
[NO TESTS NEEDED]
Signed-off-by: Riyad Preukschas <riyad@informatik.uni-bremen.de>
<MH: Fixed cherry-pick conflicts>
Signed-off-by: Matthew Heon <mheon@redhat.com>
-rw-r--r-- | pkg/api/handlers/compat/containers_create.go | 1 | ||||
-rw-r--r-- | pkg/api/handlers/compat/system.go | 1 |
2 files changed, 2 insertions, 0 deletions
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) diff --git a/pkg/api/handlers/compat/system.go b/pkg/api/handlers/compat/system.go index e21ae160a..66b4236f9 100644 --- a/pkg/api/handlers/compat/system.go +++ b/pkg/api/handlers/compat/system.go @@ -19,6 +19,7 @@ func GetDiskUsage(w http.ResponseWriter, r *http.Request) { df, err := ic.SystemDf(r.Context(), options) if err != nil { utils.InternalServerError(w, err) + return } imgs := make([]*docker.ImageSummary, len(df.Images)) |