Avoid SIGSEGV on batch send failure (file with index XX is absent)

In case of the following error:
  Failed to send batch: file with index 23742 is absent

NULL dereference will occur for the "remote".
This commit is contained in:
Azat Khuzhin 2019-09-21 02:22:25 +03:00
parent 1fe79ad43c
commit b22b65dd29
No known key found for this signature in database
GPG Key ID: B86086848EF8686D

View File

@ -392,7 +392,8 @@ struct StorageDistributedDirectoryMonitor::Batch
remote->writePrepared(in);
}
remote->writeSuffix();
if (remote)
remote->writeSuffix();
}
catch (const Exception & e)
{