]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] gh-108342: Break ref cycle in SSLSocket._create() exc (GH-108344) (#108349)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 23 Aug 2023 10:10:04 +0000 (03:10 -0700)
committerGitHub <noreply@github.com>
Wed, 23 Aug 2023 10:10:04 +0000 (12:10 +0200)
commit93714b7db795b14b26adffde30753cfda0ca4867
tree6b147154360cb85bb7f47f5e97e92193900b8b21
parent07c727e92a72ea8a9e7d9705b4afc261c32fa1ce
[3.11] gh-108342: Break ref cycle in SSLSocket._create() exc (GH-108344) (#108349)

Explicitly break a reference cycle when SSLSocket._create() raises an
exception. Clear the variable storing the exception, since the
exception traceback contains the variables and so creates a reference
cycle.

This test leak was introduced by the test added for the fix of GH-108310.
(cherry picked from commit 64f99350351bc46e016b2286f36ba7cd669b79e3)

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/ssl.py