mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
rawmidi: fix memory leak in snd_rawmidi_virtual_open
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
0f4821ec17
commit
c56278cfda
1 changed files with 2 additions and 1 deletions
|
|
@ -315,7 +315,7 @@ int snd_rawmidi_virtual_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
|
|||
int merge, int mode)
|
||||
{
|
||||
int err;
|
||||
snd_rawmidi_t *rmidi;
|
||||
snd_rawmidi_t *rmidi = NULL;
|
||||
snd_rawmidi_virtual_t *virt = NULL;
|
||||
struct pollfd pfd;
|
||||
|
||||
|
|
@ -392,6 +392,7 @@ int snd_rawmidi_virtual_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
|
|||
free(*inputp);
|
||||
if (outputp)
|
||||
free(*outputp);
|
||||
free(rmidi);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue