mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 05:31:20 +00:00 
			
		
		
		
	bpo-46280: Fix tracemalloc_copy_domain() (GH-30591)
Test if tracemalloc_copy_traces() failed to allocated memory in
tracemalloc_copy_domain().
(cherry picked from commit 7c770d3350)
Co-authored-by: Victor Stinner <vstinner@python.org>
			
			
This commit is contained in:
		
							parent
							
								
									537f16adfa
								
							
						
					
					
						commit
						ae6e255cb3
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -1241,6 +1241,9 @@ tracemalloc_copy_domain(_Py_hashtable_t *domains, | |||
|     _Py_hashtable_t *traces = (_Py_hashtable_t *)value; | ||||
| 
 | ||||
|     _Py_hashtable_t *traces2 = tracemalloc_copy_traces(traces); | ||||
|     if (traces2 == NULL) { | ||||
|         return -1; | ||||
|     } | ||||
|     if (_Py_hashtable_set(domains2, TO_PTR(domain), traces2) < 0) { | ||||
|         _Py_hashtable_destroy(traces2); | ||||
|         return -1; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Miss Islington (bot)
						Miss Islington (bot)