Commit 4cc26659 authored by Chris Wright's avatar Chris Wright Committed by Greg Kroah-Hartman

[PATCH] USB: Memory Leaks on Error Paths of usb-midi

parent 5e8569af
......@@ -1750,7 +1750,7 @@ static int alloc_usb_midi_device( struct usb_device *d, struct usb_midi_state *s
return 0;
error_end:
if ( mdevs != NULL && devices > 0 ) {
if ( mdevs != NULL ) {
for ( i=0 ; i<devices ; i++ ) {
if ( mdevs[i] != NULL ) {
unregister_sound_midi( mdevs[i]->dev_midi );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment