Skip to content

Commit

Permalink
Add missing early returns in compat API
Browse files Browse the repository at this point in the history
[NO TESTS NEEDED]

Signed-off-by: Riyad Preukschas <[email protected]>

<MH: Fixed cherry-pick conflicts>

Signed-off-by: Matthew Heon <[email protected]>
  • Loading branch information
riyad authored and mheon committed Feb 18, 2021
1 parent 26c1abf commit d05e313
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/api/handlers/compat/containers_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions pkg/api/handlers/compat/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d05e313

Please sign in to comment.