Skip to content

Commit a75ce93

Browse files
YunlongsSeth Sims
authored andcommitted
bpo-41995: Fix null ptr deref in tracemalloc_copy_trace() (pythonGH-22660)
Fix a null pointer dereference in tracemalloc_copy_trace() of _tracemalloc.
1 parent 51a5601 commit a75ce93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_tracemalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,7 @@ tracemalloc_copy_trace(_Py_hashtable_t *traces,
11991199
trace_t *trace = (trace_t *)value;
12001200

12011201
trace_t *trace2 = raw_malloc(sizeof(trace_t));
1202-
if (traces2 == NULL) {
1202+
if (trace2 == NULL) {
12031203
return -1;
12041204
}
12051205
*trace2 = *trace;

0 commit comments

Comments
 (0)