seq: seq.c - fix calloc arguments

The usage was inverted. The first argument is count of
elements, the second one is size of one element.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2025-02-02 22:27:29 +01:00
parent 0bb35d4980
commit 305168fd22

View file

@ -1356,7 +1356,7 @@ int snd_seq_set_input_buffer_size(snd_seq_t *seq, size_t size)
if (size != seq->ibufsize) {
char *newbuf;
/* use ump event size for avoiding reallocation at switching */
newbuf = calloc(sizeof(snd_seq_ump_event_t), size);
newbuf = calloc(size, sizeof(snd_seq_ump_event_t));
if (newbuf == NULL)
return -ENOMEM;
free(seq->ibuf);