final batch of adding NULL checks

This commit is contained in:
iceman1001 committed 2026-09-15 08:36:13 +02:00
1 parent 0cfe0e0e8d
commit e6c1c4e1a7
11 files changed
+66

No files matched your search

+5
View File
@@ -152,6 +152,11 @@ void initSampleBufferEx(uint32_t *sample_size, bool use_malloc) {
} else {
*sample_size = MIN(*sample_size, BigBuf_max_traceLen());
data.buffer = BigBuf_calloc(*sample_size);
if (data.buffer == NULL) {
Dbprintf("Failed to allocate memory, using whole BigBuf");
*sample_size = BigBuf_max_traceLen();
data.buffer = BigBuf_get_addr();
}
}
} else {