mirror of
https://github.com/reactos/reactos.git
synced 2024-06-28 08:51:29 +00:00
[BTRFS]
Cherry pick aa04ca0ea4cadb0c70ff6d659916cc98b7b02c27: uninit: don't free roots before FCBs are freed This avoids use-after-free on shutdown svn path=/trunk/; revision=71314
This commit is contained in:
parent
ece9acc307
commit
e1036d5ff1
|
@ -2374,6 +2374,13 @@ void STDCALL uninit(device_extension* Vcb, BOOL flush) {
|
|||
|
||||
release_tree_lock(Vcb, TRUE);
|
||||
}
|
||||
|
||||
// FIXME - stop async threads
|
||||
|
||||
free_fcb(Vcb->volume_fcb);
|
||||
free_fileref(Vcb->root_fileref);
|
||||
|
||||
// FIXME - free any open fcbs?
|
||||
|
||||
while (!IsListEmpty(&Vcb->roots)) {
|
||||
LIST_ENTRY* le = RemoveHeadList(&Vcb->roots);
|
||||
|
@ -2402,9 +2409,6 @@ void STDCALL uninit(device_extension* Vcb, BOOL flush) {
|
|||
ExFreePool(c);
|
||||
}
|
||||
|
||||
free_fcb(Vcb->volume_fcb);
|
||||
free_fileref(Vcb->root_fileref);
|
||||
|
||||
for (i = 0; i < Vcb->superblock.num_devices; i++) {
|
||||
while (!IsListEmpty(&Vcb->devices[i].disk_holes)) {
|
||||
LIST_ENTRY* le = RemoveHeadList(&Vcb->devices[i].disk_holes);
|
||||
|
|
Loading…
Reference in a new issue