Open Eta76 opened 2 years ago
You are right. Can you please create a PR for this.
I've created a pull request (I'm ETA76's coworker).
@FischerSeb So this macro is not meant to be used for the currently allocated type? I suspected that you possibly needed to call the correct macro, knowing that is m_info contains a map or list. (isMap(), isList())
Line 720 of SOCmnList.cpp should proabably say: SOCMN_FREE_OBJECT_C(m_info, (**SOCmnListInfoMap***));
Haven't looked into the MACRO, but they could be all deleting the same pointer. Making line 719 and 720 not do anything
Source: OPC-Classic-SDK-main\development\core\src\SOCmn\SOCmnList.cpp BOOL SOCmnListHeader::create( IN OPTIONAL SOCmnListConfig creationConfig) { if (isInit()) { return FALSE; } if (isList()) { if ((m_type & SOCMNLIST_TYPE_INFO_FULL_LIST) != 0) { SOCMN_FREE_OBJECT_C(m_info, (SOCmnListInfoFullList)); } else { SOCMN_FREE_OBJECT_C(m_info, (SOCmnListInfoSimpleList)); } } else if (isMap()) { SOCMN_FREE_OBJECT_C(m_info, (SOCmnListInfoMap)); } else { // something went wrong and the old type can not determined SOCMN_FREE_OBJECT_C(m_info, (SOCmnListInfoFullList)); SOCMN_FREE_OBJECT_C(m_info, (SOCmnListInfoSimpleList)); SOCMN_FREE_OBJECT_C(m_info, (SOCmnListInfoSimpleList*)); <===== Line 720 }