diff --git a/src/singletons/NativeMessaging.cpp b/src/singletons/NativeMessaging.cpp index ed113f716..bedfc7387 100644 --- a/src/singletons/NativeMessaging.cpp +++ b/src/singletons/NativeMessaging.cpp @@ -147,8 +147,7 @@ void NativeMessagingServer::ReceiverThread::run() while (true) { try { - std::unique_ptr buf( - static_cast(malloc(MESSAGE_SIZE))); + std::unique_ptr buf = std::make_unique(MESSAGE_SIZE); ipc::message_queue::size_type retSize; unsigned int priority;