Skip to content

Commit 4b0e191

Browse files
author
Jon Chiappetta
committed
Free Null
1 parent a1d4a79 commit 4b0e191

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/openvpn/ssl.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,14 @@ tls_session_init(struct tls_multi *multi, struct tls_session *session)
10201020
/* load most recent packet-id to replay protect on --tls-auth */
10211021
packet_id_persist_load_obj(session->tls_wrap.opt.pid_persist, &session->tls_wrap.opt.packet_id);
10221022

1023-
key_state_init(session, &session->key[KS_PRIMARY]);
1023+
for (size_t i = 0; i < KS_SIZE; ++i)
1024+
{
1025+
key_state_init(session, &session->key[i]);
1026+
if (i != KS_PRIMARY)
1027+
{
1028+
session->key[i].state = S_UNDEF;
1029+
}
1030+
}
10241031

10251032
dmsg(D_TLS_DEBUG, "TLS: tls_session_init: new session object, sid=%s",
10261033
session_id_print(&session->session_id, &gc));

0 commit comments

Comments
 (0)