mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-25 13:58:46 +01:00
Fix access violation in ggml_cuda_free_data if tensor->extra is NULL (#4554)
This commit is contained in:
parent
799fc22689
commit
1d7a1912ce
@ -9091,7 +9091,7 @@ void ggml_cuda_transform_tensor(void * data, struct ggml_tensor * tensor) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ggml_cuda_free_data(struct ggml_tensor * tensor) {
|
void ggml_cuda_free_data(struct ggml_tensor * tensor) {
|
||||||
if (!tensor || (tensor->backend != GGML_BACKEND_GPU && tensor->backend != GGML_BACKEND_GPU_SPLIT) ) {
|
if (!tensor || !tensor->extra || (tensor->backend != GGML_BACKEND_GPU && tensor->backend != GGML_BACKEND_GPU_SPLIT) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user