summaryrefslogtreecommitdiffstats
path: root/Modules/_tracemalloc.c
diff options
context:
space:
mode:
authorYunlongs <lylgood@foxmail.com>2020-10-13 06:46:31 (GMT)
committerGitHub <noreply@github.com>2020-10-13 06:46:31 (GMT)
commit66c28f50c76e4f23af7146e0e580457c5fd6bde7 (patch)
treeda015a152d1b2d376fa1f85af6191ddddcc87179 /Modules/_tracemalloc.c
parent64eb259cc1e42a5f74b5911a518d2c50daa8d50b (diff)
downloadcpython-66c28f50c76e4f23af7146e0e580457c5fd6bde7.zip
cpython-66c28f50c76e4f23af7146e0e580457c5fd6bde7.tar.gz
cpython-66c28f50c76e4f23af7146e0e580457c5fd6bde7.tar.bz2
bpo-41995: Fix null ptr deref in tracemalloc_copy_trace() (GH-22660)
Fix a null pointer dereference in tracemalloc_copy_trace() of _tracemalloc.
Diffstat (limited to 'Modules/_tracemalloc.c')
-rw-r--r--Modules/_tracemalloc.c2
1 files changed, 1 insertions, 1 deletions
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;