From 62128af6cad5447d60b2273ae956a646f85e44e2 Mon Sep 17 00:00:00 2001 From: Pierre Wielders Date: Fri, 1 Nov 2024 12:41:32 +0100 Subject: [PATCH] Update IUnknown.cpp Thank you Coverity! I like tools that add value :-) --- Source/com/IUnknown.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/com/IUnknown.cpp b/Source/com/IUnknown.cpp index 862520145..01ac13c30 100644 --- a/Source/com/IUnknown.cpp +++ b/Source/com/IUnknown.cpp @@ -101,17 +101,19 @@ namespace ProxyStub { // ------------------------------------------------------------------------------------------- string UnknownProxy::LinkId() const { + string result(_T("/Dangling")); + _adminLock.Lock(); if (_channel.IsValid() == true) { const RPC::Communicator::Client* comchannel = dynamic_cast(_channel.operator->()); ASSERT(comchannel != nullptr); if (comchannel != nullptr) { - return (comchannel->Extension().Origin()); + result = comchannel->Extension().Origin(); } } _adminLock.Unlock(); - return (_T("/Dangling")); + return (result); } uint32_t UnknownProxy::Id() const {