Skip to content
Permalink
Browse files

Make sure and free startup_key_state allocations when session free.

  • Loading branch information
colinw-smartrg committed Dec 11, 2019
1 parent 3273607 commit 88f6e60924fc443b0aa422db0b79c0f5ba89c4c4
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/session.c
@@ -982,6 +982,13 @@ session_free(LIBSSH2_SESSION *session)
LIBSSH2_FREE(session, session->remote.lang_prefs);
}

/* Free startup_key_state.key_state_low variables */
if(session->startup_key_state.key_state_low.private_key != NULL)
_libssh2_ecdsa_free(session->startup_key_state.key_state_low.private_key);

if(session->startup_key_state.key_state_low.public_key_oct != NULL)
free(session->startup_key_state.key_state_low.public_key_oct);

/*
* Make sure all memory used in the state variables are free
*/

0 comments on commit 88f6e60

Please sign in to comment.
You can’t perform that action at this time.