mirror of
https://github.com/python/cpython.git
synced 2025-10-12 09:53:19 +00:00
bpo-41995: Fix null ptr deref in tracemalloc_copy_trace() (GH-22660)
Fix a null pointer dereference in tracemalloc_copy_trace() of _tracemalloc.
This commit is contained in:
parent
64eb259cc1
commit
66c28f50c7
1 changed files with 1 additions and 1 deletions
|
@ -1199,7 +1199,7 @@ tracemalloc_copy_trace(_Py_hashtable_t *traces,
|
||||||
trace_t *trace = (trace_t *)value;
|
trace_t *trace = (trace_t *)value;
|
||||||
|
|
||||||
trace_t *trace2 = raw_malloc(sizeof(trace_t));
|
trace_t *trace2 = raw_malloc(sizeof(trace_t));
|
||||||
if (traces2 == NULL) {
|
if (trace2 == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
*trace2 = *trace;
|
*trace2 = *trace;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue