Skip to content

Commit

Permalink
protect against invalid reads: check IO has relinquished File.
Browse files Browse the repository at this point in the history
  • Loading branch information
alja authored and abh3 committed Jun 30, 2016
1 parent ffaeaa3 commit d66b04e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/XrdFileCache/XrdFileCache.cc
Expand Up @@ -305,7 +305,7 @@ File* Cache::GetFileWithLocalPath(std::string path, IO* iIo)
XrdSysMutexHelper lock(&m_active_mutex);
for ( std::vector<DiskNetIO>::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);
Expand Down

0 comments on commit d66b04e

Please sign in to comment.