QUIC APL: Add missing unlock call (coverity)
authorHugo Landau <hlandau@openssl.org>
Thu, 27 Jul 2023 15:17:33 +0000 (16:17 +0100)
committerHugo Landau <hlandau@openssl.org>
Thu, 10 Aug 2023 17:19:51 +0000 (18:19 +0100)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21565)

ssl/quic/quic_impl.c

index e285c66cb87baa97249b4a71cc7faa387acf8e72..cf6233fc5b59c2967328f81a1d0622ae4f678a6a 100644 (file)
@@ -2565,9 +2565,11 @@ int ossl_quic_set_default_stream_mode(SSL *s, uint32_t mode)
 
     quic_lock(ctx.qc);
 
-    if (ctx.qc->default_xso_created)
+    if (ctx.qc->default_xso_created) {
+        quic_unlock(ctx.qc);
         return QUIC_RAISE_NON_NORMAL_ERROR(&ctx, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED,
                                            "too late to change default stream mode");
+    }
 
     switch (mode) {
     case SSL_DEFAULT_STREAM_MODE_NONE: