Mercurial > dropbear
diff cli-authpubkey.c @ 406:2448ae3e75b5
Fix leak of keybuf in recv_msg_userauth_pk_ok, courtesy of Klocwork
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 03 Feb 2007 13:31:01 +0000 |
parents | aad4b3f58556 |
children | b895f91c2ee6 |
line wrap: on
line diff
--- a/cli-authpubkey.c Sat Feb 03 13:23:18 2007 +0000 +++ b/cli-authpubkey.c Sat Feb 03 13:31:01 2007 +0000 @@ -60,8 +60,8 @@ void recv_msg_userauth_pk_ok() { - struct SignKeyList *keyitem; - buffer* keybuf; + struct SignKeyList *keyitem = NULL; + buffer* keybuf = NULL; char* algotype = NULL; unsigned int algolen; int keytype; @@ -121,6 +121,8 @@ } else { TRACE(("That was whacky. We got told that a key was valid, but it didn't match our list. Sounds like dodgy code on Dropbear's part")) } + + buf_free(keybuf); TRACE(("leave recv_msg_userauth_pk_ok")) }