The filehandle allocated in NdisOpenFile() is allocated using
ExAllocatePoolWithTag(), not malloc(), so it should be released with ExFreePool(), not free(). Fix a couple if instances of free(fh, ...) that got overlooked.
This commit is contained in:
parent
bc3a5f5cc9
commit
bb3714b327
@ -2752,7 +2752,7 @@ NdisOpenFile(status, filehandle, filelength, filename, highestaddr)
|
||||
}
|
||||
|
||||
if (TAILQ_EMPTY(&mountlist)) {
|
||||
free(fh, M_TEMP);
|
||||
ExFreePool(fh);
|
||||
*status = NDIS_STATUS_FILE_NOT_FOUND;
|
||||
printf("NDIS: could not find file %s in linker list\n",
|
||||
afilename);
|
||||
@ -2764,7 +2764,7 @@ NdisOpenFile(status, filehandle, filelength, filename, highestaddr)
|
||||
|
||||
path = ExAllocatePoolWithTag(NonPagedPool, MAXPATHLEN, 0);
|
||||
if (path == NULL) {
|
||||
free(fh, M_TEMP);
|
||||
ExFreePool(fh);
|
||||
*status = NDIS_STATUS_RESOURCES;
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user