USB: memory leak in iowarrior.c

this is a classical memory leak in the ioctl handler. The buffer is simply
never freed. This fixes it the obvious way.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Oliver Neukum and committed by Greg Kroah-Hartman fc0f8fc9 944dc184

+4 -3
+4 -3
drivers/usb/misc/iowarrior.c
··· 495 495 496 496 /* verify that the device wasn't unplugged */ 497 497 if (!dev->present) { 498 - mutex_unlock(&dev->mutex); 499 - return -ENODEV; 498 + retval = -ENODEV; 499 + goto error_out; 500 500 } 501 501 502 502 dbg("%s - minor %d, cmd 0x%.4x, arg %ld", __func__, dev->minor, cmd, ··· 579 579 retval = -ENOTTY; 580 580 break; 581 581 } 582 - 582 + error_out: 583 583 /* unlock the device */ 584 584 mutex_unlock(&dev->mutex); 585 + kfree(buffer); 585 586 return retval; 586 587 } 587 588