Fixed ledger read fd leak. Reordered subsystem init. (#138)

This commit is contained in:
Ravin Perera
2020-10-26 08:11:55 +05:30
committed by GitHub
parent a60444b57f
commit 116a54e980
3 changed files with 15 additions and 11 deletions

View File

@@ -310,6 +310,7 @@ namespace sc
// Write the json message and close write fd.
if (write(stdinpipe[1], json.data(), json.size()) == -1)
{
close(stdinpipe[1]);
LOG_ERROR << errno << ": Failed to write to stdin of contract process.";
return -1;
}