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 .
IOSAD-230
positron 1 year ago
parent 6039b10ca5
commit c3797c3ccd
  1. 6
      src/pEpEngine.c

@ -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