final batch of adding NULL checks
This commit is contained in:
1 parent
0cfe0e0e8d
commit
e6c1c4e1a7
11 files changed
+66
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user