diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go
index 771cc5fcfa..556cab49fb 100644
--- a/pkg/api/handlers/compat/images_build.go
+++ b/pkg/api/handlers/compat/images_build.go
@@ -895,7 +895,6 @@ func extractTarFile(r *http.Request) (string, error) {
 
 	// Content-Length not used as too many existing API clients didn't honor it
 	_, err = io.Copy(tarBall, r.Body)
-	r.Body.Close()
 	if err != nil {
 		return "", fmt.Errorf("failed Request: Unable to copy tar file from request body %s", r.RequestURI)
 	}
diff --git a/pkg/api/handlers/libpod/kube.go b/pkg/api/handlers/libpod/kube.go
index 2abefa5d1d..2f53f82d7e 100644
--- a/pkg/api/handlers/libpod/kube.go
+++ b/pkg/api/handlers/libpod/kube.go
@@ -108,7 +108,6 @@ func KubePlay(w http.ResponseWriter, r *http.Request) {
 		options.Start = types.NewOptionalBool(query.Start)
 	}
 	report, err := containerEngine.PlayKube(r.Context(), r.Body, options)
-	_ = r.Body.Close()
 	if err != nil {
 		utils.Error(w, http.StatusInternalServerError, fmt.Errorf("playing YAML file: %w", err))
 		return
@@ -132,7 +131,6 @@ func KubePlayDown(w http.ResponseWriter, r *http.Request) {
 
 	containerEngine := abi.ContainerEngine{Libpod: runtime}
 	report, err := containerEngine.PlayKubeDown(r.Context(), r.Body, entities.PlayKubeDownOptions{Force: query.Force})
-	_ = r.Body.Close()
 	if err != nil {
 		utils.Error(w, http.StatusInternalServerError, fmt.Errorf("tearing down YAML file: %w", err))
 		return