Skip to content

Commit

Permalink
Fix OOM print handling of NULL file pointer (#8527)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhightower83 committed Apr 4, 2022
1 parent fbedcc1 commit 04fe1b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cores/esp8266/heap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void IRAM_ATTR print_loc(size_t size, const char* file, int line)
DEBUG_HEAP_PRINTF(":oom(%d)@", (int)size);

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

0 comments on commit 04fe1b9

Please sign in to comment.