forked from Minki/linux
musb: potential use after free
We assign "urb->hcpriv = qh;" a few lines down. I'm pretty sure we want it "urb->hcpriv" to be NULL not a freed value. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
5e0e61afa5
commit
714bc5ef3e
@ -2042,6 +2042,7 @@ static int musb_urb_enqueue(
|
||||
* odd, rare, error prone, but legal.
|
||||
*/
|
||||
kfree(qh);
|
||||
qh = NULL;
|
||||
ret = 0;
|
||||
} else
|
||||
ret = musb_schedule(musb, qh,
|
||||
|
Loading…
Reference in New Issue
Block a user