usb/gadget: don't leak hs_descriptors
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 11 Apr 2011 18:44:30 +0000 (20:44 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 13 Apr 2011 22:44:03 +0000 (15:44 -0700)
We should free both descriptors.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/f_audio.c

index 9abecfddb27d1c489a59edfe29512adb93990a67..0111f8a9cf7fcc3f6345a9e6d612ea5683474530 100644 (file)
@@ -706,6 +706,7 @@ f_audio_unbind(struct usb_configuration *c, struct usb_function *f)
        struct f_audio          *audio = func_to_audio(f);
 
        usb_free_descriptors(f->descriptors);
+       usb_free_descriptors(f->hs_descriptors);
        kfree(audio);
 }