diff options
author | sss <sss@dark-alexandr.net> | 2021-02-15 03:23:56 +0300 |
---|---|---|
committer | sss <sss@dark-alexandr.net> | 2021-02-15 03:23:56 +0300 |
commit | c2b4548382a2b6baaa882e886f1eeff0185c4b40 (patch) | |
tree | ec6aab1d3ad5f3668654fe400f2108d6b12250df /protocols/JabberG/src | |
parent | cbd4d5a24e120de4ce6e2317417a47ca87b93f1f (diff) |
jabber: omemo: fix memory management error
Diffstat (limited to 'protocols/JabberG/src')
-rwxr-xr-x | protocols/JabberG/src/jabber_omemo.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/protocols/JabberG/src/jabber_omemo.cpp b/protocols/JabberG/src/jabber_omemo.cpp index 3791b120d3..160c50936c 100755 --- a/protocols/JabberG/src/jabber_omemo.cpp +++ b/protocols/JabberG/src/jabber_omemo.cpp @@ -1926,7 +1926,9 @@ bool CJabberProto::OmemoCheckSession(MCONTACT hContact) while (id) {
if (!checked) {
pending_check = true;
- XmlNodeIq iq(AddIQ(&CJabberProto::OmemoOnIqResultGetBundle, JABBER_IQ_TYPE_GET, nullptr, &id));
+ unsigned int* _id = new unsigned int;
+ *_id = id;
+ XmlNodeIq iq(AddIQ(&CJabberProto::OmemoOnIqResultGetBundle, JABBER_IQ_TYPE_GET, nullptr, _id));
char szBareJid[JABBER_MAX_JID_LEN];
iq << XATTR("from", JabberStripJid(m_ThreadInfo->fullJID, szBareJid, _countof_portable(szBareJid)));
@@ -2077,6 +2079,7 @@ void CJabberProto::OmemoOnIqResultGetBundle(const TiXmlElement *iqNode, CJabberI while (id) {
if (id == *dev_id) {
setByte(hContact, setting_name2, 1);
+ delete dev_id;
break;
}
i++;
|