# HG changeset patch # User Matt Johnston # Date 1170509461 0 # Node ID 2448ae3e75b5244f62299d745b821bccd6ac055f # Parent 00703f1df67aa8327af9ae1926f4e699dbf3aaf1 Fix leak of keybuf in recv_msg_userauth_pk_ok, courtesy of Klocwork diff -r 00703f1df67a -r 2448ae3e75b5 cli-authpubkey.c --- 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")) }