mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-11-04 06:11:06 +00:00 
			
		
		
		
	Merge branch 'bugfix/a_small_fix_for_multi_heap_backport_v4.3' into 'release/v4.3'
Heap: fix param passed to assert_valid_block, should be block not ptr(backport v4.3) See merge request espressif/esp-idf!18675
This commit is contained in:
		@@ -214,7 +214,7 @@ void multi_heap_free_impl(multi_heap_handle_t heap, void *p)
 | 
				
			|||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    assert_valid_block(heap, p);
 | 
					    assert_valid_block(heap, block_from_ptr(p));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    multi_heap_internal_lock(heap);
 | 
					    multi_heap_internal_lock(heap);
 | 
				
			||||||
    heap->free_bytes += tlsf_block_size(p);
 | 
					    heap->free_bytes += tlsf_block_size(p);
 | 
				
			||||||
@@ -231,7 +231,7 @@ void *multi_heap_realloc_impl(multi_heap_handle_t heap, void *p, size_t size)
 | 
				
			|||||||
        return multi_heap_malloc_impl(heap, size);
 | 
					        return multi_heap_malloc_impl(heap, size);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    assert_valid_block(heap, p);
 | 
					    assert_valid_block(heap, block_from_ptr(p));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (heap == NULL) {
 | 
					    if (heap == NULL) {
 | 
				
			||||||
        return NULL;
 | 
					        return NULL;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user