mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-11 05:33:43 -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 merge, int mode)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
snd_rawmidi_t *rmidi;
|
snd_rawmidi_t *rmidi = NULL;
|
||||||
snd_rawmidi_virtual_t *virt = NULL;
|
snd_rawmidi_virtual_t *virt = NULL;
|
||||||
struct pollfd pfd;
|
struct pollfd pfd;
|
||||||
|
|
||||||
|
|
@ -392,6 +392,7 @@ int snd_rawmidi_virtual_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
|
||||||
free(*inputp);
|
free(*inputp);
|
||||||
if (outputp)
|
if (outputp)
|
||||||
free(*outputp);
|
free(*outputp);
|
||||||
|
free(rmidi);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue