summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2018-03-20 16:10:58 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2018-03-20 16:10:58 +0000
commita2e7633822e7d0f996b19e32c6c49b6242a86a9e (patch)
tree374476c6b9df204c4680e25d6b0c0e219cc85720 /lib
parent0210029b617674d420e55dba5931baf0ea7b0e93 (diff)
In i2d_SSL_SESSION(), on error call CBB_cleanup() with the correct CBB.
Spotted by Coverity, although reported as a different issue.
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/ssl_asn1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/ssl_asn1.c b/lib/libssl/ssl_asn1.c
index 95d369306e8..0ca442faa0c 100644
--- a/lib/libssl/ssl_asn1.c
+++ b/lib/libssl/ssl_asn1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_asn1.c,v 1.55 2017/05/06 16:18:36 jsing Exp $ */
+/* $OpenBSD: ssl_asn1.c,v 1.56 2018/03/20 16:10:57 jsing Exp $ */
/*
* Copyright (c) 2016 Joel Sing <jsing@openbsd.org>
*
@@ -204,7 +204,7 @@ i2d_SSL_SESSION(SSL_SESSION *s, unsigned char **pp)
rv = (int)data_len;
err:
- CBB_cleanup(&session);
+ CBB_cleanup(&cbb);
freezero(data, data_len);
free(peer_cert_bytes);