diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-10-05 02:51:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-05 02:51:48 +0200 |
commit | 6cf34000b9ff8fb4821ea695621393bda2f2c41e (patch) | |
tree | a8f94c3b05acb7b246fc076bfe856adbcd7fa67c | |
parent | 0330d1abed7559e33baf50167a161e8ec54363b3 (diff) | |
parent | aaa9f4ea9022576250b75349dd908613d5e3378a (diff) | |
download | podman-6cf34000b9ff8fb4821ea695621393bda2f2c41e.tar.gz podman-6cf34000b9ff8fb4821ea695621393bda2f2c41e.tar.bz2 podman-6cf34000b9ff8fb4821ea695621393bda2f2c41e.zip |
Merge pull request #16050 from baude/bz2131836
Prevent nil pointer deref in GetImage
-rw-r--r-- | pkg/api/handlers/compat/images.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/images.go b/pkg/api/handlers/compat/images.go index cce482441..d61df5232 100644 --- a/pkg/api/handlers/compat/images.go +++ b/pkg/api/handlers/compat/images.go @@ -403,7 +403,7 @@ func GetImage(w http.ResponseWriter, r *http.Request) { } inspect, err := handlers.ImageDataToImageInspect(r.Context(), newImage) if err != nil { - utils.Error(w, http.StatusInternalServerError, fmt.Errorf("failed to convert ImageData to ImageInspect '%s': %w", inspect.ID, err)) + utils.Error(w, http.StatusInternalServerError, fmt.Errorf("failed to convert ImageData to ImageInspect '%s': %w", name, err)) return } utils.WriteResponse(w, http.StatusOK, inspect) |