Skip to content

Commit 9ec68d9

Browse files
author
jsing
committed
SSL_CTX_remove_session() checks for a NULL session, avoid doing it twice.
Noted by tb@ during review of a larger change.
1 parent ca60217 commit 9ec68d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/libssl/ssl_pkt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: ssl_pkt.c,v 1.47 2021/07/31 09:31:04 jsing Exp $ */
1+
/* $OpenBSD: ssl_pkt.c,v 1.48 2021/08/04 12:41:25 jsing Exp $ */
22
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
33
* All rights reserved.
44
*
@@ -1204,7 +1204,7 @@ int
12041204
ssl3_send_alert(SSL *s, int level, int desc)
12051205
{
12061206
/* If a fatal one, remove from cache */
1207-
if ((level == SSL3_AL_FATAL) && (s->session != NULL))
1207+
if (level == SSL3_AL_FATAL)
12081208
SSL_CTX_remove_session(s->ctx, s->session);
12091209

12101210
S3I(s)->alert_dispatch = 1;

0 commit comments

Comments
 (0)