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:
Bill Paul 2005-03-28 22:03:47 +00:00
parent 00df63a690
commit 18be2d04d8

View file

@ -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;
}