Commit 29e9689d authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] fix use-after-free in ide_unregister()

parent c0eeedbb
......@@ -673,8 +673,8 @@ void ide_unregister (unsigned int index)
blk_cleanup_queue(&drive->queue);
}
if (hwif->next == hwif) {
kfree(hwgroup);
BUG_ON(hwgroup->hwif != hwif);
kfree(hwgroup);
} else {
/* There is another interface in hwgroup.
* Unlink us, and set hwgroup->drive and ->hwif to
......
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