]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-42144: Add a missing "goto error;" in the _ssl module (GH-22959)
authorMiss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 25 Oct 2020 18:21:35 +0000 (11:21 -0700)
committerGitHub <noreply@github.com>
Sun, 25 Oct 2020 18:21:35 +0000 (11:21 -0700)
(cherry picked from commit c32f2976b8f4034724c3270397aa16f38daf470f)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Modules/_ssl.c

index e6dda298cbe25ac437973e82608857747707be33..49e8a191e5d2dbb2e42bf52e3e0b476e5c41abee 100644 (file)
@@ -901,6 +901,7 @@ _ssl_configure_hostname(PySSLSocket *self, const char* server_hostname)
     if (ip == NULL) {
         if (!SSL_set_tlsext_host_name(self->ssl, server_hostname)) {
             _setSSLError(NULL, 0, __FILE__, __LINE__);
+            goto error;
         }
     }
     if (self->ctx->check_hostname) {