From d9574823f2080892aee7faccb1282e9f6e5859e6 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Tue, 20 Mar 2018 16:10:57 +0000 Subject: In i2d_SSL_SESSION(), on error call CBB_cleanup() with the correct CBB. Spotted by Coverity, although reported as a different issue. --- src/lib/libssl/ssl_asn1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libssl/ssl_asn1.c b/src/lib/libssl/ssl_asn1.c index 95d369306e..0ca442faa0 100644 --- a/src/lib/libssl/ssl_asn1.c +++ b/src/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 * @@ -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); -- cgit v1.2.3-55-g6feb