mirror of https://github.com/wolfSSL/wolfssh.git
commit
37d1b5b4e9
|
@ -1395,6 +1395,7 @@ void wolfSSH_AGENT_free(WOLFSSH_AGENT_CTX* agent)
|
|||
if (agent != NULL) {
|
||||
if (agent->msg != NULL)
|
||||
WFREE(agent->msg, agent->heap, DYNTYPE_AGENT_BUFFER);
|
||||
wc_FreeRng(&agent->rng);
|
||||
wolfSSH_AGENT_ID_list_free(agent->idList, heap);
|
||||
WMEMSET(agent, 0, sizeof(*agent));
|
||||
WFREE(agent, heap, DYNTYPE_AGENT);
|
||||
|
|
|
@ -591,6 +591,9 @@ int wolfSSH_accept(WOLFSSH* ssh)
|
|||
ssh->ctx->agentCb(WOLFSSH_AGENT_LOCAL_SETUP,
|
||||
ssh->agentCbCtx);
|
||||
}
|
||||
if (ssh->agent != NULL)
|
||||
wolfSSH_AGENT_free(ssh->agent);
|
||||
ssh->agent = newAgent;
|
||||
}
|
||||
#endif /* WOLFSSH_AGENT */
|
||||
ssh->acceptState = ACCEPT_CLIENT_SESSION_ESTABLISHED;
|
||||
|
|
|
@ -5643,6 +5643,7 @@ static int wolfSSH_SFTP_GetHandle(WOLFSSH* ssh, byte* handle, word32* handleSz)
|
|||
|
||||
case STATE_GET_HANDLE_CLEANUP:
|
||||
WLOG(WS_LOG_SFTP, "SFTP GET HANDLE STATE: CLEANUP");
|
||||
wolfSSH_SFTP_buffer_free(ssh, &state->buffer);
|
||||
if (ssh->getHandleState != NULL) {
|
||||
WFREE(ssh->getHandleState,
|
||||
ssh->ctx->heap, DYNTYPE_SFTP_STATE);
|
||||
|
|
Loading…
Reference in New Issue