Agent.c : Preserve error info from agent_list_identities()
Files : agent.c
Notes :
Currently the error details as returned by agent_transact_pageant() are overwritten by a generic "agent list id failed" message by int agent_list_identities(LIBSSH2_AGENT* agent).
Credit :
Zenju
@@ -522,7 +522,9 @@ agent_list_identities(LIBSSH2_AGENT *agent)
rc = agent->ops->transact(agent, transctx);
if(rc) {
- goto error;
+ LIBSSH2_FREE(agent->session, transctx->response);
+ transctx->response = NULL;
+ return rc;
}
transctx->request = NULL;
