8000 Merge pull request #9 from vchandla/patch-2 · g-coder/midikit@0204141 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0204141

Browse files
committed
Merge pull request jpommerening#9 from vchandla/patch-2
Update port.c
2 parents b8a4a49 + 072aabc commit 0204141

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

midi/port.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,13 @@ struct MIDIPort * MIDIPortCreate( char * name, int mode, void * target,
223223
port->name = malloc( namelen );
224224
port->target = target;
225225
port->receive = receive;
226-
port->ports = MIDIListCreate( MIDIPortType );
227226

228227
if( port->name == NULL ) {
229228
free( port );
230229
return NULL;
231230
}
231+
232+
port->ports = MIDIListCreate( MIDIPortType );
232233
if( port->ports == NULL ) {
233234
/* probably ENOMEM, in that case, error code is already set by MIDIList */
234235
free (port->name);

0 commit comments

Comments
 (0)
0