fix the issue of illegal memory access

This commit is contained in:
leejet 2025-08-31 12:41:16 +08:00
parent fed78a3f1a
commit 50f921119e

View File

@ -1269,11 +1269,11 @@ int main(int argc, const char* argv[]) {
} }
} }
free(results);
for (int i = 0; i < num_results; i++) { for (int i = 0; i < num_results; i++) {
free(results[i].data); free(results[i].data);
results[i].data = NULL; results[i].data = NULL;
} }
free(results);
free_sd_ctx(sd_ctx); free_sd_ctx(sd_ctx);
free(control_image_buffer); free(control_image_buffer);
free(input_image_buffer); free(input_image_buffer);