mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 06:02:44 +00:00 
			
		
		
		
	AK: Don't forget to kfree_sized() in ByteBuffer
This commit is contained in:
		
							parent
							
								
									0afccb560b
								
							
						
					
					
						commit
						5087b2b32f
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -243,8 +243,10 @@ private: | |||
|         new_capacity = kmalloc_good_size(new_capacity); | ||||
|         if (!m_inline) { | ||||
|             new_buffer = (u8*)kmalloc(new_capacity); | ||||
|             if (m_outline_buffer) | ||||
|             if (m_outline_buffer) { | ||||
|                 __builtin_memcpy(new_buffer, m_outline_buffer, min(new_capacity, m_outline_capacity)); | ||||
|                 kfree_sized(m_outline_buffer, m_outline_capacity); | ||||
|             } | ||||
|             VERIFY(new_buffer); | ||||
|         } else { | ||||
|             new_buffer = (u8*)kmalloc(new_capacity); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andreas Kling
						Andreas Kling