[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] auth: fix double-free in ssh_userauth_agent_publickey


Resolves https://bugs.libssh.org/T72.

Signed-off-by: Jon Simons <jon@xxxxxxxxxxxxx>
---
 src/auth.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/auth.c b/src/auth.c
index 8a686dc2..1baec109 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -707,6 +707,7 @@ static int ssh_userauth_agent_publickey(ssh_session session,
 
     rc = ssh_buffer_add_ssh_string(session->out_buffer, str);
     ssh_string_free(str);
+    str = NULL;
     if (rc < 0) {
         goto fail;
     }
-- 
2.14.1


Archive administrator: postmaster@lists.cynapses.org