1
0
mirror of https://github.com/bobranten/Ext4Fsd.git synced 2025-10-29 13:18:30 -05:00

corrected an error that made the debug version of the driver crash

This commit is contained in:
Bo Branten
2024-06-19 01:39:12 +02:00
parent 4bed73db38
commit 0ae9117fc5
3 changed files with 8 additions and 8 deletions

View File

@@ -510,7 +510,7 @@ Ext2LoadInode (IN PEXT2_VCB Vcb,
}
if (!Ext2LoadBuffer(NULL, Vcb, offset, EXT4_INODE_SIZE(Inode->i_sb), ext4i)) {
ExFreePool(ext4i);
Ext2FreePool(ext4i, EXT2_INODE_MAGIC);
return FALSE;
}
@@ -518,7 +518,7 @@ Ext2LoadInode (IN PEXT2_VCB Vcb,
ext4_inode_csum_verify(Inode, ext4i, &unused);
ExFreePool(ext4i);
Ext2FreePool(ext4i, EXT2_INODE_MAGIC);
return TRUE;
}
@@ -572,7 +572,7 @@ Ext2SaveInode ( IN PEXT2_IRP_CONTEXT IrpContext,
rc = Ext2LoadBuffer(NULL, Vcb, offset, EXT4_INODE_SIZE(Inode->i_sb), ext4i);
if (!rc) {
DEBUG(DL_ERR, ( "Ext2SaveInode: failed reading inode %u.\n", Inode->i_ino));
ExFreePool(ext4i);
Ext2FreePool(ext4i, EXT2_INODE_MAGIC);
goto errorout;
}
@@ -586,7 +586,7 @@ Ext2SaveInode ( IN PEXT2_IRP_CONTEXT IrpContext,
Ext2StartFloppyFlushDpc(Vcb, NULL, NULL);
}
ExFreePool(ext4i);
Ext2FreePool(ext4i, EXT2_INODE_MAGIC);
errorout:
return rc;

View File

@@ -622,7 +622,7 @@ Ext2IsVolumeDirty (
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.
//
@@ -2677,7 +2677,7 @@ Ext2CheckDismount (
if (NewVpb != NULL) {
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));
}

View File

@@ -433,7 +433,7 @@ VOID Ext2FreeEntry (IN struct dentry *de)
ASSERT(de != NULL);
if (de->d_name.name)
ExFreePool(de->d_name.name);
Ext2FreePool(de->d_name.name, 'EB2E');
ExFreeToNPagedLookasideList(&(Ext2Global->Ext2DentryLookasideList), de);
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)) {
ASSERT(Vcb->Vpb2 != NULL);
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));
Vcb->Vpb2 = NULL;
}