Skip to content

Commit 42f88b4

Browse files
airliediThalay
authored andcommitted
fix bug introduced in using calloc (llama/7701)
compilade pointed this out on the previous MR
1 parent e930493 commit 42f88b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml-alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ ggml_gallocr_t ggml_gallocr_new_n(ggml_backend_buffer_type_t * bufts, int n_bufs
377377
galloc->bufts = calloc(n_bufs, sizeof(ggml_backend_buffer_type_t));
378378
GGML_ASSERT(galloc->bufts != NULL);
379379

380-
galloc->buffers = calloc(n_bufs, sizeof(ggml_backend_buffer_t) * n_bufs);
380+
galloc->buffers = calloc(n_bufs, sizeof(ggml_backend_buffer_t));
381381
GGML_ASSERT(galloc->buffers != NULL);
382382

383383
galloc->buf_tallocs = calloc(n_bufs, sizeof(struct ggml_dyn_tallocr *));

0 commit comments

Comments
 (0)