Skip to content

Commit 30bfdad

Browse files
Added missing "if (umm_heap == NULL) {..." to umm_free_heap_size_lw (#6929)
also called through xPortGetFreeHeapSize, umm_free_heap_size, ... Co-authored-by: Earle F. Philhower, III <earlephilhower@yahoo.com>
1 parent 52d84b1 commit 30bfdad

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: cores/esp8266/umm_malloc/umm_local.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,10 @@ UMM_STATISTICS ummStats;
162162

163163
// Keep complete call path in IRAM
164164
size_t umm_free_heap_size_lw( void ) {
165+
if (umm_heap == NULL) {
166+
umm_init();
167+
}
168+
165169
return (size_t)ummStats.free_blocks * sizeof(umm_block);
166170
}
167171
#endif
@@ -211,5 +215,3 @@ int ICACHE_FLASH_ATTR umm_info_safe_printf_P(const char *fmt, ...) {
211215
}
212216

213217
#endif // BUILD_UMM_MALLOC_C
214-
215-

0 commit comments

Comments
 (0)