From 66c28f50c76e4f23af7146e0e580457c5fd6bde7 Mon Sep 17 00:00:00 2001 From: Yunlongs Date: Tue, 13 Oct 2020 14:46:31 +0800 Subject: bpo-41995: Fix null ptr deref in tracemalloc_copy_trace() (GH-22660) Fix a null pointer dereference in tracemalloc_copy_trace() of _tracemalloc. --- Modules/_tracemalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index fc91622..04f6c24 100644 --- a/Modules/_tracemalloc.c +++ b/Modules/_tracemalloc.c @@ -1199,7 +1199,7 @@ tracemalloc_copy_trace(_Py_hashtable_t *traces, trace_t *trace = (trace_t *)value; trace_t *trace2 = raw_malloc(sizeof(trace_t)); - if (traces2 == NULL) { + if (trace2 == NULL) { return -1; } *trace2 = *trace; -- cgit v0.12