Previously, when data could be created and sig not, we would unlink
sig, not data (and vice versa).
if (sigFd == -1 || dataFd == -1)
{
if (dataFd != -1)
- unlink(sig);
- if (sigFd != -1)
unlink(data);
+ if (sigFd != -1)
+ unlink(sig);
ioprintf(std::cerr, "Couldn't create tempfiles for splitting up %s", File.c_str());
exit(EINTERNAL);
}
SplitClearSignedFile(File, &message, &dataHeader, &signature) == false)
{
if (dataFd != -1)
- unlink(sig);
- if (sigFd != -1)
unlink(data);
+ if (sigFd != -1)
+ unlink(sig);
ioprintf(std::cerr, "Splitting up %s into data and signature failed", File.c_str());
exit(112);
}