From d66b04e529f70665ae40171849d590ecabea66f1 Mon Sep 17 00:00:00 2001 From: Alja Mrak-Tadel Date: Fri, 10 Jun 2016 14:34:13 -0700 Subject: [PATCH] protect against invalid reads: check IO has relinquished File. --- src/XrdFileCache/XrdFileCache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/XrdFileCache/XrdFileCache.cc b/src/XrdFileCache/XrdFileCache.cc index ced8ab84cab..897a53a952c 100644 --- a/src/XrdFileCache/XrdFileCache.cc +++ b/src/XrdFileCache/XrdFileCache.cc @@ -305,7 +305,7 @@ File* Cache::GetFileWithLocalPath(std::string path, IO* iIo) XrdSysMutexHelper lock(&m_active_mutex); for ( std::vector::iterator it = m_active.begin(); it != m_active.end(); ++it) { - if (!strcmp(path.c_str(), it->file->lPath())) + if (it->file && (!strcmp(path.c_str(), it->file->lPath()))) { File *ff = it->file; it->io->RelinquishFile(ff);