diff --git a/examples/llava/clip.cpp b/examples/llava/clip.cpp index 4251f884e..24073c5a9 100644 --- a/examples/llava/clip.cpp +++ b/examples/llava/clip.cpp @@ -2049,7 +2049,7 @@ static std::vector> uhd_slice_image(const clip_imag images[images.size()-1].push_back(patch); } } - delete refine_image; + clip_image_u8_free(refine_image); } return images; } @@ -2091,7 +2091,7 @@ bool clip_image_preprocess(struct clip_ctx * ctx, const clip_image_u8 * img, cli for (size_t i = 0; i < imgs.size(); ++i) { for (size_t j = 0; j < imgs[i].size(); ++j) { if (imgs[i][j] != nullptr) { - delete imgs[i][j]; + clip_image_u8_free(imgs[i][j]); } } }