Skip to content

Commit

Permalink
Fix wrong usage of delete in OPCUA_ObjectStructHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
m-meingast authored and azoitl committed Apr 10, 2024
1 parent 249049e commit da15d9b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/com/opc_ua/opcua_objectstruct_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,10 @@ bool COPC_UA_ObjectStruct_Helper::isOPCUAObjectPresent(std::string &paBrowsePath
if(localHandler) {
CActionInfo::CNodePairInfo nodePair(nullptr, paBrowsePath);
bool retVal = localHandler->isOPCUAObjectPresent(nodePair);
if(nodePair.mNodeId) delete nodePair.mNodeId;
if(nodePair.mNodeId)
{
UA_NodeId_delete(nodePair.mNodeId);
}
return retVal;
} else {
DEVLOG_ERROR("[OPC UA OBJECT STRUCT HELPER]: Failed to get LocalHandler because LocalHandler is null!\n");
Expand Down

0 comments on commit da15d9b

Please sign in to comment.