summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2018-03-20 16:10:57 +0000
committerjsing <>2018-03-20 16:10:57 +0000
commitd9574823f2080892aee7faccb1282e9f6e5859e6 (patch)
tree1b5504984d709ad0c5502aeeacef57821b01119a /src
parentb2caddc2ad6785096c5e0f5f75754bd79a0b2a66 (diff)
downloadopenbsd-d9574823f2080892aee7faccb1282e9f6e5859e6.tar.gz
openbsd-d9574823f2080892aee7faccb1282e9f6e5859e6.tar.bz2
openbsd-d9574823f2080892aee7faccb1282e9f6e5859e6.zip
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 'src')
-rw-r--r--src/lib/libssl/ssl_asn1.c4
1 files changed, 2 insertions, 2 deletions
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 @@
1/* $OpenBSD: ssl_asn1.c,v 1.55 2017/05/06 16:18:36 jsing Exp $ */ 1/* $OpenBSD: ssl_asn1.c,v 1.56 2018/03/20 16:10:57 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2016 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2016 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -204,7 +204,7 @@ i2d_SSL_SESSION(SSL_SESSION *s, unsigned char **pp)
204 rv = (int)data_len; 204 rv = (int)data_len;
205 205
206 err: 206 err:
207 CBB_cleanup(&session); 207 CBB_cleanup(&cbb);
208 freezero(data, data_len); 208 freezero(data, data_len);
209 free(peer_cert_bytes); 209 free(peer_cert_bytes);
210 210