diff --git a/client/incus_images.go b/client/incus_images.go index ebb71dd8e..a0ce1a77b 100644 --- a/client/incus_images.go +++ b/client/incus_images.go @@ -462,7 +462,6 @@ func (r *ProtocolIncus) CreateImage(image api.ImagesPost, args *ImageCreateArgs) } // Prepare the body - var ioErr error var body io.Reader var contentType string if args.RootfsFile == nil { @@ -610,10 +609,6 @@ func (r *ProtocolIncus) CreateImage(image api.ImagesPost, args *ImageCreateArgs) defer func() { _ = resp.Body.Close() }() - if ioErr != nil { - return nil, err - } - // Handle errors response, _, err := incusParseResponse(resp) if err != nil {