From 2f9d54351e7413534e446abfc313b1c04aea495a Mon Sep 17 00:00:00 2001 From: Bret Ambrose Date: Thu, 19 Sep 2024 10:06:11 -0700 Subject: [PATCH] Streaming operation reference fixup --- source/iot/MqttRequestResponseClient.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/iot/MqttRequestResponseClient.cpp b/source/iot/MqttRequestResponseClient.cpp index dc142002b..23e985483 100644 --- a/source/iot/MqttRequestResponseClient.cpp +++ b/source/iot/MqttRequestResponseClient.cpp @@ -252,6 +252,7 @@ namespace Aws aws_mqtt_request_response_client_create_streaming_operation(client, &streamingOptions); if (!stream) { + Aws::Crt::Delete(implHandle, allocator); return nullptr; } @@ -259,6 +260,9 @@ namespace Aws allocator, stream, options, aws_mqtt_request_response_client_get_event_loop(client)); auto streamingOperation = Aws::Crt::MakeShared(allocator, impl); + implHandle->m_allocator = allocator; + implHandle->m_impl = impl; + return streamingOperation; }