ggml_backend_cpu_graph_compute : fix return value when alloc fails

This commit is contained in:
slaren 2024-03-13 17:59:55 +01:00
parent 0d934ee517
commit 3c38789f5b

View file

@ -795,7 +795,7 @@ GGML_CALL static enum ggml_status ggml_backend_cpu_graph_compute(ggml_backend_t
free(cpu_ctx->work_data);
cpu_ctx->work_data = malloc(cplan.work_size);
if (cpu_ctx->work_data == NULL) {
return false;
return GGML_STATUS_ALLOC_FAILED;
}
cpu_ctx->work_size = cplan.work_size;
}