mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Fixed initialization of snd_midi_event_t structure seq_midi_event_t
This commit is contained in:
parent
eb267ade29
commit
45dfa6ee1b
1 changed files with 2 additions and 1 deletions
|
|
@ -139,7 +139,7 @@ int snd_midi_event_new(size_t bufsize, snd_midi_event_t **rdev)
|
|||
snd_midi_event_t *dev;
|
||||
|
||||
*rdev = NULL;
|
||||
dev = (snd_midi_event_t *)malloc(sizeof(snd_midi_event_t));
|
||||
dev = (snd_midi_event_t *)calloc(1, sizeof(snd_midi_event_t));
|
||||
if (dev == NULL)
|
||||
return -ENOMEM;
|
||||
if (bufsize > 0) {
|
||||
|
|
@ -150,6 +150,7 @@ int snd_midi_event_new(size_t bufsize, snd_midi_event_t **rdev)
|
|||
}
|
||||
}
|
||||
dev->bufsize = bufsize;
|
||||
dev->lastcmd = 0xff;
|
||||
*rdev = dev;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue