From 50f921119e7003b462e11d351c171f285def468f Mon Sep 17 00:00:00 2001 From: leejet Date: Sun, 31 Aug 2025 12:41:16 +0800 Subject: [PATCH] fix the issue of illegal memory access --- examples/cli/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/cli/main.cpp b/examples/cli/main.cpp index 23998ff..dba707e 100644 --- a/examples/cli/main.cpp +++ b/examples/cli/main.cpp @@ -1269,11 +1269,11 @@ int main(int argc, const char* argv[]) { } } - free(results); for (int i = 0; i < num_results; i++) { free(results[i].data); results[i].data = NULL; } + free(results); free_sd_ctx(sd_ctx); free(control_image_buffer); free(input_image_buffer);