replace malloc with make_unique
This commit is contained in:
@@ -147,8 +147,7 @@ void NativeMessagingServer::ReceiverThread::run()
|
|||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
std::unique_ptr<char> buf(
|
std::unique_ptr<char> buf = std::make_unique<char>(MESSAGE_SIZE);
|
||||||
static_cast<char *>(malloc(MESSAGE_SIZE)));
|
|
||||||
ipc::message_queue::size_type retSize;
|
ipc::message_queue::size_type retSize;
|
||||||
unsigned int priority;
|
unsigned int priority;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user