Browse Source

fix minor memory leak: free session->curr_passphrase at session closing

Another leak, much more complex and difficult to reproduce, remains.  See
_do_full_reset_on_single_own_ungrouped_identity in src/key_reset.c .
ENGINE-955
Luca Saiu 2 months ago
parent
commit
c3797c3ccd
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/pEpEngine.c

+ 6
- 0
src/pEpEngine.c View File

@ -161,6 +161,12 @@ DYNAMIC_API void release(PEP_SESSION session)
sqlite3_close_v2(session->system_db);
}
if (!EMPTYSTR(session->curr_passphrase)) {
free (session->curr_passphrase);
/* In case the following freeing code still uses the field. */
session->curr_passphrase = NULL;
}
release_transport_system(session, out_last);
release_cryptotech(session, out_last);
free(session);


Loading…
Cancel
Save