mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-19 04:37:51 +00:00
ggml alloc: Fix for null dereference on alloc failure (llama/5200)
* Fix for a null pointer dereference if a metal GGML buffer fails to be allocated * Freeing the allocated buffers rather than the pointer in ggml-alloc.c * Fixed the fix of the fix
This commit is contained in:
parent
25f650a8e8
commit
8a7d6ff51a
@ -791,7 +791,7 @@ static bool alloc_tensor_range(struct ggml_context * ctx,
|
|||||||
for (size_t i = 0; i < *n_buffers; i++) {
|
for (size_t i = 0; i < *n_buffers; i++) {
|
||||||
ggml_backend_buffer_free(*buffers[i]);
|
ggml_backend_buffer_free(*buffers[i]);
|
||||||
}
|
}
|
||||||
free(buffers);
|
free(*buffers);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user