summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2024-06-03 07:59:54 +1000
committerGitHub <noreply@github.com>2024-06-02 17:59:54 -0400
commit3413ae2193d0693f14bead02e5018f442cbf579b (patch)
tree77fa66a63fe071b3a2b3c02e5cca6b00e8c8c252
parent1669810d7c2446af8425aa54ff6611bf6f14646c (diff)
fix bug introduced in using calloc (#7701)
compilade pointed this out on the previous MR
-rw-r--r--ggml-alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ggml-alloc.c b/ggml-alloc.c
index 1fbd376e..0146946e 100644
--- a/ggml-alloc.c
+++ b/ggml-alloc.c
@@ -377,7 +377,7 @@ ggml_gallocr_t ggml_gallocr_new_n(ggml_backend_buffer_type_t * bufts, int n_bufs
galloc->bufts = calloc(n_bufs, sizeof(ggml_backend_buffer_type_t));
GGML_ASSERT(galloc->bufts != NULL);
- galloc->buffers = calloc(n_bufs, sizeof(ggml_backend_buffer_t) * n_bufs);
+ galloc->buffers = calloc(n_bufs, sizeof(ggml_backend_buffer_t));
GGML_ASSERT(galloc->buffers != NULL);
galloc->buf_tallocs = calloc(n_bufs, sizeof(struct ggml_dyn_tallocr *));