mirror of
				https://github.com/GrapheneOS/hardened_malloc.git
				synced 2025-10-27 14:36:32 +01:00 
			
		
		
		
	initialize ptr to nullptr in handle_out_of_memory
It will break out of the loop in the first iteration if there's no handler or the handler throws an out-of-memory error.
This commit is contained in:
		
							parent
							
								
									4fbfe4d3ec
								
							
						
					
					
						commit
						b66ca56ba1
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		
							
								
								
									
										2
									
								
								new.cc
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								new.cc
									
										
									
									
									
								
							|  | @ -9,7 +9,7 @@ extern "C" { | |||
| } | ||||
| 
 | ||||
| COLD static void *handle_out_of_memory(size_t size, bool nothrow) { | ||||
|     void *ptr; | ||||
|     void *ptr = nullptr; | ||||
| 
 | ||||
|     do { | ||||
|         std::new_handler handler = std::get_new_handler(); | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue