summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMiss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com>2020-10-13 07:09:08 (GMT)
committerGitHub <noreply@github.com>2020-10-13 07:09:08 (GMT)
commitafe86066e748076f970ccd277fc64fc51bea189b (patch)
treeaac9c6594263c9c7e052c7e1b21e39d8c5b71969 /Modules
parent15ef19f7d7d703bba65da9e2c10fa7851049686a (diff)
downloadcpython-afe86066e748076f970ccd277fc64fc51bea189b.zip
cpython-afe86066e748076f970ccd277fc64fc51bea189b.tar.gz
cpython-afe86066e748076f970ccd277fc64fc51bea189b.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. (cherry picked from commit 66c28f50c76e4f23af7146e0e580457c5fd6bde7) Co-authored-by: Yunlongs <lylgood@foxmail.com>
Diffstat (limited to 'Modules')
-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;