From 27b96c617d7d8f5e07e10254fc0d1e11d95c8632 Mon Sep 17 00:00:00 2001 From: Brandt Bucher Date: Wed, 20 Nov 2019 02:00:31 -0800 Subject: [PATCH] bpo-38823: Fix refleak in _tracemalloc init error handling (GH-17235) (cherry picked from commit d51a363a4379385fdfe9c09a56324631465ede29) Co-authored-by: Brandt Bucher --- Modules/_tracemalloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index ee32ac29b7eea2..cbcf55f817435f 100644 --- a/Modules/_tracemalloc.c +++ b/Modules/_tracemalloc.c @@ -1637,8 +1637,10 @@ PyInit__tracemalloc(void) if (m == NULL) return NULL; - if (tracemalloc_init() < 0) + if (tracemalloc_init() < 0) { + Py_DECREF(m); return NULL; + } return m; } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy