1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-02 01:17:52 +03:00

config: Get rid of the dynamic seen array

* This makes the array constant in the session structure, avoiding
   allocations and frees while parsing the file
 * It also drops passing the seen array to all the functions,
   because it is already part of the passed session
 * The test cases are adjusted to match these changes

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Jakub Jelen
2018-12-05 12:09:07 +01:00
committed by Andreas Schneider
parent 8f887e82c7
commit 21e2522360
9 changed files with 108 additions and 95 deletions

View File

@@ -283,7 +283,6 @@ void ssh_free(ssh_session session) {
SAFE_FREE(session->opts.gss_server_identity);
SAFE_FREE(session->opts.gss_client_identity);
SAFE_FREE(session->opts.pubkey_accepted_types);
SAFE_FREE(session->opts.options_seen);
for (i = 0; i < 10; i++) {
if (session->opts.wanted_methods[i]) {