diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2017-06-22 17:55:49 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2017-06-22 17:55:49 +0000 |
commit | a5faa87b38db7fa0b3e9d8cf5796878caa4cec81 (patch) | |
tree | b1ca7cdaa8109d0fa470563c023501a904c42232 /lib/libtls/tls.c | |
parent | 37b3dc1b97ba845d0b849484f3f18eea76d6c32d (diff) |
Plug a memory leak in tls_keypair_cert_hash(), introduced in r1.60.
Diffstat (limited to 'lib/libtls/tls.c')
-rw-r--r-- | lib/libtls/tls.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libtls/tls.c b/lib/libtls/tls.c index 77b936ed37c..e6135aedef4 100644 --- a/lib/libtls/tls.c +++ b/lib/libtls/tls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls.c,v 1.64 2017/06/22 17:47:56 jsing Exp $ */ +/* $OpenBSD: tls.c,v 1.65 2017/06/22 17:55:48 jsing Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -297,7 +297,9 @@ tls_keypair_cert_hash(struct tls_keypair *keypair, char **hash) goto err; rv = tls_cert_hash(cert, hash); + err: + X509_free(cert); BIO_free(membio); return (rv); |