summaryrefslogtreecommitdiff
path: root/ssl/quic
diff options
context:
space:
mode:
Diffstat (limited to 'ssl/quic')
-rw-r--r--ssl/quic/quic_channel.c6
-rw-r--r--ssl/quic/quic_impl.c8
2 files changed, 6 insertions, 8 deletions
diff --git a/ssl/quic/quic_channel.c b/ssl/quic/quic_channel.c
index 7e55b7b5c6..cb1c99bfcf 100644
--- a/ssl/quic/quic_channel.c
+++ b/ssl/quic/quic_channel.c
@@ -2301,11 +2301,11 @@ err:
QUIC_STREAM *ossl_quic_channel_new_stream_local(QUIC_CHANNEL *ch, int is_uni)
{
QUIC_STREAM *qs;
- int type = 0;
+ int type;
uint64_t stream_id, *p_next_ordinal;
- type |= ch->is_server ? QUIC_STREAM_INITIATOR_SERVER
- : QUIC_STREAM_INITIATOR_CLIENT;
+ type = ch->is_server ? QUIC_STREAM_INITIATOR_SERVER
+ : QUIC_STREAM_INITIATOR_CLIENT;
if (is_uni) {
p_next_ordinal = &ch->next_local_stream_ordinal_uni;
diff --git a/ssl/quic/quic_impl.c b/ssl/quic/quic_impl.c
index cce1bde5c4..581117d537 100644
--- a/ssl/quic/quic_impl.c
+++ b/ssl/quic/quic_impl.c
@@ -341,6 +341,8 @@ void ossl_quic_free(SSL *s)
if (!expect_quic(s, &ctx))
return;
+ quic_lock(ctx.qc);
+
if (ctx.is_stream) {
/*
* When a QSSO is freed, the XSO is freed immediately, because the XSO
@@ -349,8 +351,6 @@ void ossl_quic_free(SSL *s)
* as deleted for later collection.
*/
- quic_lock(ctx.qc);
-
assert(ctx.qc->num_xso > 0);
--ctx.qc->num_xso;
@@ -376,8 +376,6 @@ void ossl_quic_free(SSL *s)
return;
}
- quic_lock(ctx.qc);
-
/*
* Free the default XSO, if any. The QUIC_STREAM is not deleted at this
* stage, but is freed during the channel free when the whole QSM is freed.
@@ -1902,7 +1900,7 @@ QUIC_TAKES_LOCK
static size_t ossl_quic_pending_int(const SSL *s)
{
QCTX ctx;
- size_t avail = 0;
+ size_t avail;
int fin = 0;
if (!expect_quic_with_stream_lock(s, /*remote_init=*/-1, &ctx))