agent_list_identities: fix out of scope access

An auto variable out of scope was being referenced and used.

fixes #220
This commit is contained in:
Daniel Stenberg 2011-06-20 00:05:18 +02:00
parent 9a24b03402
commit 2db7d9c655

View File

@ -486,10 +486,10 @@ agent_list_identities(LIBSSH2_AGENT *agent)
ssize_t len, num_identities;
unsigned char *s;
int rc;
unsigned char c = SSH2_AGENTC_REQUEST_IDENTITIES;
/* Create a request to list identities */
if (transctx->state == agent_NB_state_init) {
unsigned char c = SSH2_AGENTC_REQUEST_IDENTITIES;
transctx->request = &c;
transctx->request_len = 1;
transctx->state = agent_NB_state_request_created;