mirror of
https://github.com/bobranten/Ext4Fsd.git
synced 2025-10-30 05:18:31 -05:00
corrected an error that made the debug version of the driver crash
This commit is contained in:
@@ -510,7 +510,7 @@ Ext2LoadInode (IN PEXT2_VCB Vcb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!Ext2LoadBuffer(NULL, Vcb, offset, EXT4_INODE_SIZE(Inode->i_sb), ext4i)) {
|
if (!Ext2LoadBuffer(NULL, Vcb, offset, EXT4_INODE_SIZE(Inode->i_sb), ext4i)) {
|
||||||
ExFreePool(ext4i);
|
Ext2FreePool(ext4i, EXT2_INODE_MAGIC);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -518,7 +518,7 @@ Ext2LoadInode (IN PEXT2_VCB Vcb,
|
|||||||
|
|
||||||
ext4_inode_csum_verify(Inode, ext4i, &unused);
|
ext4_inode_csum_verify(Inode, ext4i, &unused);
|
||||||
|
|
||||||
ExFreePool(ext4i);
|
Ext2FreePool(ext4i, EXT2_INODE_MAGIC);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -572,7 +572,7 @@ Ext2SaveInode ( IN PEXT2_IRP_CONTEXT IrpContext,
|
|||||||
rc = Ext2LoadBuffer(NULL, Vcb, offset, EXT4_INODE_SIZE(Inode->i_sb), ext4i);
|
rc = Ext2LoadBuffer(NULL, Vcb, offset, EXT4_INODE_SIZE(Inode->i_sb), ext4i);
|
||||||
if (!rc) {
|
if (!rc) {
|
||||||
DEBUG(DL_ERR, ( "Ext2SaveInode: failed reading inode %u.\n", Inode->i_ino));
|
DEBUG(DL_ERR, ( "Ext2SaveInode: failed reading inode %u.\n", Inode->i_ino));
|
||||||
ExFreePool(ext4i);
|
Ext2FreePool(ext4i, EXT2_INODE_MAGIC);
|
||||||
goto errorout;
|
goto errorout;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -586,7 +586,7 @@ Ext2SaveInode ( IN PEXT2_IRP_CONTEXT IrpContext,
|
|||||||
Ext2StartFloppyFlushDpc(Vcb, NULL, NULL);
|
Ext2StartFloppyFlushDpc(Vcb, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExFreePool(ext4i);
|
Ext2FreePool(ext4i, EXT2_INODE_MAGIC);
|
||||||
|
|
||||||
errorout:
|
errorout:
|
||||||
return rc;
|
return rc;
|
||||||
|
|||||||
@@ -622,7 +622,7 @@ Ext2IsVolumeDirty (
|
|||||||
IrpSp = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp);
|
IrpSp = (PEXTENDED_IO_STACK_LOCATION)IoGetCurrentIrpStackLocation(Irp);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Get a pointer to the output buffer. Look at the system buffer field in th
|
// Get a pointer to the output buffer. Look at the system buffer field in the
|
||||||
// irp first. Then the Irp Mdl.
|
// irp first. Then the Irp Mdl.
|
||||||
//
|
//
|
||||||
|
|
||||||
@@ -2677,7 +2677,7 @@ Ext2CheckDismount (
|
|||||||
|
|
||||||
if (NewVpb != NULL) {
|
if (NewVpb != NULL) {
|
||||||
DEBUG(DL_DBG, ( "Ext2CheckDismount: freeing new Vpb %p\n", NewVpb));
|
DEBUG(DL_DBG, ( "Ext2CheckDismount: freeing new Vpb %p\n", NewVpb));
|
||||||
ExFreePoolWithTag(NewVpb, TAG_VPB);
|
Ext2FreePool(NewVpb, TAG_VPB);
|
||||||
DEC_MEM_COUNT(PS_VPB, NewVpb, sizeof(VPB));
|
DEC_MEM_COUNT(PS_VPB, NewVpb, sizeof(VPB));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ VOID Ext2FreeEntry (IN struct dentry *de)
|
|||||||
ASSERT(de != NULL);
|
ASSERT(de != NULL);
|
||||||
|
|
||||||
if (de->d_name.name)
|
if (de->d_name.name)
|
||||||
ExFreePool(de->d_name.name);
|
Ext2FreePool(de->d_name.name, 'EB2E');
|
||||||
|
|
||||||
ExFreeToNPagedLookasideList(&(Ext2Global->Ext2DentryLookasideList), de);
|
ExFreeToNPagedLookasideList(&(Ext2Global->Ext2DentryLookasideList), de);
|
||||||
DEC_MEM_COUNT(PS_DENTRY, de, sizeof(struct dentry));
|
DEC_MEM_COUNT(PS_DENTRY, de, sizeof(struct dentry));
|
||||||
@@ -2819,7 +2819,7 @@ Ext2DestroyVcb (IN PEXT2_VCB Vcb)
|
|||||||
if (IsFlagOn(Vcb->Flags, VCB_NEW_VPB)) {
|
if (IsFlagOn(Vcb->Flags, VCB_NEW_VPB)) {
|
||||||
ASSERT(Vcb->Vpb2 != NULL);
|
ASSERT(Vcb->Vpb2 != NULL);
|
||||||
DEBUG(DL_DBG, ("Ext2DestroyVcb: Vpb2 to be freed: %p\n", Vcb->Vpb2));
|
DEBUG(DL_DBG, ("Ext2DestroyVcb: Vpb2 to be freed: %p\n", Vcb->Vpb2));
|
||||||
ExFreePoolWithTag(Vcb->Vpb2, TAG_VPB);
|
Ext2FreePool(Vcb->Vpb2, TAG_VPB);
|
||||||
DEC_MEM_COUNT(PS_VPB, Vcb->Vpb2, sizeof(VPB));
|
DEC_MEM_COUNT(PS_VPB, Vcb->Vpb2, sizeof(VPB));
|
||||||
Vcb->Vpb2 = NULL;
|
Vcb->Vpb2 = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user