summaryrefslogtreecommitdiff
path: root/lib/libssl
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2021-08-04 12:41:26 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2021-08-04 12:41:26 +0000
commit438c8549e357279c219f593a7843d1a4de6e1164 (patch)
tree4b9e67d96123f45bd01479b959375731437f7a6c /lib/libssl
parentb971f142de28c9c0551ab3bea1b575d1705498e4 (diff)
SSL_CTX_remove_session() checks for a NULL session, avoid doing it twice.
Noted by tb@ during review of a larger change.
Diffstat (limited to 'lib/libssl')
-rw-r--r--lib/libssl/ssl_pkt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/ssl_pkt.c b/lib/libssl/ssl_pkt.c
index 2b1a6a41a2b..66c57b13a4d 100644
--- a/lib/libssl/ssl_pkt.c
+++ b/lib/libssl/ssl_pkt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_pkt.c,v 1.47 2021/07/31 09:31:04 jsing Exp $ */
+/* $OpenBSD: ssl_pkt.c,v 1.48 2021/08/04 12:41:25 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1204,7 +1204,7 @@ int
ssl3_send_alert(SSL *s, int level, int desc)
{
/* If a fatal one, remove from cache */
- if ((level == SSL3_AL_FATAL) && (s->session != NULL))
+ if (level == SSL3_AL_FATAL)
SSL_CTX_remove_session(s->ctx, s->session);
S3I(s)->alert_dispatch = 1;