Skip to content

Commit 49fd47f

Browse files
mhightower83hasenradball
authored andcommitted
Fix OOM print handling of NULL file pointer (esp8266#8527)
1 parent 2c77564 commit 49fd47f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp8266/heap.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ void IRAM_ATTR print_loc(size_t size, const char* file, int line)
173173
DEBUG_HEAP_PRINTF(":oom(%d)@", (int)size);
174174

175175
bool inISR = ETS_INTR_WITHINISR();
176-
if (inISR && (uint32_t)file >= 0x40200000) {
176+
if (NULL == file || (inISR && (uint32_t)file >= 0x40200000)) {
177177
DEBUG_HEAP_PRINTF("File: %p", file);
178178
} else if (!inISR && (uint32_t)file >= 0x40200000) {
179179
char buf[strlen_P(file) + 1];

0 commit comments

Comments
 (0)