commit | 4cde4bdcc86cb08ee3847500a172cc24eba37ffe | [log] [tgz] |
---|---|---|
author | INADA Naoki <methane@users.noreply.github.com> | Mon Sep 04 12:31:41 2017 +0900 |
committer | GitHub <noreply@github.com> | Mon Sep 04 12:31:41 2017 +0900 |
tree | cfc4c00f39f0cc6e9fec1e9756cf81c059ff9d6a | |
parent | 990b2d043cdfaafc3378550f7d27259410a6b918 [diff] [blame] |
bpo-31095: Fix potential crash during GC (GH-3197) (cherry picked from commit a6296d34a478b4f697ea9db798146195075d496c)
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 45a1d01..213c7d2 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c
@@ -2214,6 +2214,8 @@ static void context_dealloc(PySSLContext *self) { + /* bpo-31095: UnTrack is needed before calling any callbacks */ + PyObject_GC_UnTrack(self); context_clear(self); SSL_CTX_free(self->ctx); #ifdef OPENSSL_NPN_NEGOTIATED