Skip to content

Commit

Permalink
seq: seq.c - fix calloc arguments
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
perexg committed Feb 2, 2025
1 parent 0bb35d4 commit 305168f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/seq/seq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 305168f

Please sign in to comment.