From a9698c34fc020bfbe8ce9b48fa4b271f164e2dda Mon Sep 17 00:00:00 2001 From: dan-du-car Date: Mon, 15 Apr 2024 20:39:16 +0000 Subject: [PATCH] update --- .../TelematicBridgePlugin/src/TelematicBridgeMsgWorker.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v2i-hub/TelematicBridgePlugin/src/TelematicBridgeMsgWorker.h b/src/v2i-hub/TelematicBridgePlugin/src/TelematicBridgeMsgWorker.h index ec67f8432..7b512bb43 100644 --- a/src/v2i-hub/TelematicBridgePlugin/src/TelematicBridgeMsgWorker.h +++ b/src/v2i-hub/TelematicBridgePlugin/src/TelematicBridgeMsgWorker.h @@ -241,8 +241,8 @@ namespace TelematicBridge else { // Render a cJSON entity to text for transfer/storage. Free the char* when finished. - auto payloadPtr = std::make_unique(cJSON_Print(msg->payload)); - json["payload"] = StringToJson(*payloadPtr); + std::unique_ptr payloadPtr{ cJSON_Print(msg->payload), std::free }; + json["payload"] = StringToJson(payloadPtr.get()); } }