}
SysLogException(NID_IO, E_SYSTEM, "[E_SYSTEM] Failed to poll (%d, %s).", errno, strerror(errno));
+
+ ReleaseFd(fd);
return E_SYSTEM;
}
if (pEndOfMessage)
{
pReply = new (std::nothrow) IPC::Message(message.data(), pEndOfMessage - message.data());
- SysTryReturnResult(NID_IO, pReply != null, E_OUT_OF_MEMORY, "The memory is insufficient.");
+ if (pReply == null)
+ {
+ SysLogException(NID_IO, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The memory is insufficient.");
+
+ ReleaseFd(fd);
+ return E_OUT_OF_MEMORY;
+ }
+
break;
}
}