summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2017-06-22 17:55:48 +0000
committerjsing <>2017-06-22 17:55:48 +0000
commit0a0b8616727dbc53a49279b3ee5daf316641b943 (patch)
tree33f6197823cabc392b8b509d423373b5b4ef69df /src
parent9fc419bc78bd04af70a369f43fc36002e019a582 (diff)
downloadopenbsd-0a0b8616727dbc53a49279b3ee5daf316641b943.tar.gz
openbsd-0a0b8616727dbc53a49279b3ee5daf316641b943.tar.bz2
openbsd-0a0b8616727dbc53a49279b3ee5daf316641b943.zip
Plug a memory leak in tls_keypair_cert_hash(), introduced in r1.60.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libtls/tls.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libtls/tls.c b/src/lib/libtls/tls.c
index 77b936ed37..e6135aedef 100644
--- a/src/lib/libtls/tls.c
+++ b/src/lib/libtls/tls.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls.c,v 1.64 2017/06/22 17:47:56 jsing Exp $ */ 1/* $OpenBSD: tls.c,v 1.65 2017/06/22 17:55:48 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -297,7 +297,9 @@ tls_keypair_cert_hash(struct tls_keypair *keypair, char **hash)
297 goto err; 297 goto err;
298 298
299 rv = tls_cert_hash(cert, hash); 299 rv = tls_cert_hash(cert, hash);
300
300 err: 301 err:
302 X509_free(cert);
301 BIO_free(membio); 303 BIO_free(membio);
302 304
303 return (rv); 305 return (rv);