mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
refactor(ci): prevent memory leak message without memory leak
This commit is contained in:
parent
82a110c7f3
commit
7781bfae79
@ -32,11 +32,13 @@ void unity_utils_check_leak(unsigned int before_free,
|
||||
|
||||
unsigned int leaked = (size_t)(free_delta * -1);
|
||||
|
||||
if (leaked > 0) {
|
||||
printf("MALLOC_CAP_%s %s leak: Before %u bytes free, After %u bytes free (delta %u)\n",
|
||||
type,
|
||||
leaked <= threshold ? "potential" : "critical",
|
||||
before_free, after_free, leaked);
|
||||
fflush(stdout);
|
||||
}
|
||||
TEST_ASSERT_MESSAGE(leaked <= threshold, "The test leaked too much memory");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user