Browse Source

free memory

COM-121
Volker Birk 6 years ago
parent
commit
c3904d9e93
2 changed files with 6 additions and 0 deletions
  1. +3
    -0
      CpEpEngine.cpp
  2. +3
    -0
      pEp_utility.h

+ 3
- 0
CpEpEngine.cpp View File

@ -978,6 +978,7 @@ PEP_STATUS CpEpEngine::messageToSend(void * obj, const message *msg)
assert(r == S_OK);
if (r == E_OUTOFMEMORY)
return PEP_OUT_OF_MEMORY;
clear_text_message(&_msg);
if (r != S_OK)
return PEP_UNKNOWN_ERROR;
@ -998,6 +999,8 @@ sync_handshake_result CpEpEngine::showHandshake(void * obj, const pEp_identity *
sync_handshake_result_s result;
HRESULT r = me->Fire_ShowHandshake(&_self, &_partner, &result);
assert(r == S_OK);
clear_identity_s(_self);
clear_identity_s(_partner);
if (r != S_OK)
return SYNC_HANDSHAKE_CANCEL;


+ 3
- 0
pEp_utility.h View File

@ -36,6 +36,9 @@ namespace pEp {
};
void copy_identity(pEp_identity_s * ident_s, const pEp_identity * ident);
void free_identity_strings(pEp_identity_s * ident_s);
void clear_identity_s(pEp_identity_s& ident);
void clear_text_message(text_message *msg);
::pEp_identity *new_identity(const pEp_identity_s * ident);
static LPTYPELIB pTypelib = NULL;


Loading…
Cancel
Save