From: Dan Carpenter Date: Thu, 25 Mar 2010 11:14:27 +0000 (+0200) Subject: musb: potential use after free X-Git-Tag: MMI-PSA29.97-13-9~24029^2~25 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=714bc5ef3edaec3ca0cf155fe01411760527c52e;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index dec896e888db..877d20b1dff9 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -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,