]> git.ipfire.org Git - thirdparty/squid.git/commit - src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc
Fix NULL pointer access with asyncio when Squid starts up over the disk
authorwessels <>
Wed, 24 May 2006 00:24:41 +0000 (00:24 +0000)
committerwessels <>
Wed, 24 May 2006 00:24:41 +0000 (00:24 +0000)
commite65c313fd9eb710ddca93cb5f092299db0edd7eb
tree55f92e77f0b592ac546c37fabd80439cffe51b3d
parentd9e7ee1f0e254b062ca4109ba2fe4c81b7d76c7b
Fix NULL pointer access with asyncio when Squid starts up over the disk
space limit.

We used to call squidaio_init() from DiskThreadsDiskFile::operator new.
But this only gets called when opening a file.  If the first transaction
is to unlink a file, squidaio will be uninitialized.

I didn't see any other good places to call squidaio_init().  For now
I am calling it from within the squidaio module itself at the
start of each open, unlink/truncate, and stat call.
src/DiskIO/DiskThreads/DiskThreadsDiskFile.cc
src/DiskIO/DiskThreads/DiskThreadsIOStrategy.cc
src/DiskIO/DiskThreads/aiops.cc