Signed-off-by: Alex Henrie <alexhenrie24@xxxxxxxxx> --- src/rawmidi/rawmidi_virt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rawmidi/rawmidi_virt.c b/src/rawmidi/rawmidi_virt.c index 2c4c27f5..884b8ff8 100644 --- a/src/rawmidi/rawmidi_virt.c +++ b/src/rawmidi/rawmidi_virt.c @@ -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; } -- 2.29.2.368.ge46b91665e.dirty