Skip to content

Commit 3413ae2

Browse files
authored
fix bug introduced in using calloc (#7701)
compilade pointed this out on the previous MR
1 parent 1669810 commit 3413ae2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ggml-alloc.c

+1-1
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)