From fe4a7b538b9b6c53299d883bee258e4d3597be9d Mon Sep 17 00:00:00 2001 From: cbdev Date: Fri, 20 Sep 2019 03:43:13 +0200 Subject: Update documentation, fix minor leaks --- backends/midi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/midi.c') diff --git a/backends/midi.c b/backends/midi.c index 65ce48a..d9ac698 100644 --- a/backends/midi.c +++ b/backends/midi.c @@ -358,7 +358,7 @@ static int midi_start(){ //connect to the sequencer if(snd_seq_open(&sequencer, "default", SND_SEQ_OPEN_DUPLEX, 0) < 0){ fprintf(stderr, "Failed to open ALSA sequencer\n"); - return 0; + goto bail; } snd_seq_nonblock(sequencer, 1); @@ -367,7 +367,7 @@ static int midi_start(){ //update the sequencer client name if(snd_seq_set_client_name(sequencer, sequencer_name ? sequencer_name : "MIDIMonster") < 0){ fprintf(stderr, "Failed to set MIDI client name to %s\n", sequencer_name); - return 1; + goto bail; } //create all ports -- cgit v1.2.3