summaryrefslogtreecommitdiff
path: root/common-kex.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2022-03-29 23:47:30 +0800
committerMatt Johnston <matt@ucc.asn.au>2022-03-29 23:47:30 +0800
commitc3d0ebb0bd6e0c3d2dfb7f4d99df362b55e6838c (patch)
tree4c5793f3b9ddfe02c6be12a6e0329956d1a3403e /common-kex.c
parentce6a452969257be775dd74fc99cd15350fa917f2 (diff)
downloaddropbear-c3d0ebb0bd6e0c3d2dfb7f4d99df362b55e6838c.tar.gz
Use buf_burn_free() instead of two calls
Diffstat (limited to 'common-kex.c')
-rw-r--r--common-kex.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/common-kex.c b/common-kex.c
index 41384d0..6aaec29 100644
--- a/common-kex.c
+++ b/common-kex.c
@@ -306,8 +306,7 @@ static void gen_new_keys() {
mp_clear(ses.dh_K);
m_free(ses.dh_K);
hash_desc->process(&hs, ses.hash->data, ses.hash->len);
- buf_burn(ses.hash);
- buf_free(ses.hash);
+ buf_burn_free(ses.hash);
ses.hash = NULL;
if (IS_DROPBEAR_CLIENT) {
@@ -803,8 +802,7 @@ void finish_kexhashbuf(void) {
}
#endif
- buf_burn(ses.kexhashbuf);
- buf_free(ses.kexhashbuf);
+ buf_burn_free(ses.kexhashbuf);
m_burn(&hs, sizeof(hash_state));
ses.kexhashbuf = NULL;