diff options
author | LoganDark <github@logandark.mozmail.com> | 2023-12-21 01:59:27 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-21 10:59:27 +0100 |
commit | 1d7a1912cea2227f9a1a449758ed622c560542f9 (patch) | |
tree | bc61ddfba0150f95198749f09e8c414ba51434de | |
parent | 799fc2268989482054944c902874cca76337580f (diff) |
Fix access violation in ggml_cuda_free_data if tensor->extra is NULL (#4554)
-rw-r--r-- | ggml-cuda.cu | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ggml-cuda.cu b/ggml-cuda.cu index 9f4b188c..28d37878 100644 --- a/ggml-cuda.cu +++ b/ggml-cuda.cu @@ -9091,7 +9091,7 @@ void ggml_cuda_transform_tensor(void * 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; } |