replace malloc with make_unique

This commit is contained in:
cub 2018-09-17 02:45:11 -03:00 committed by GitHub
parent bad9d5e521
commit 4c5f2e41e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -147,8 +147,7 @@ void NativeMessagingServer::ReceiverThread::run()
while (true) {
try {
std::unique_ptr<char> buf(
static_cast<char *>(malloc(MESSAGE_SIZE)));
std::unique_ptr<char> buf = std::make_unique<char>(MESSAGE_SIZE);
ipc::message_queue::size_type retSize;
unsigned int priority;