testutil: add leak check function

This commit is contained in:
Khaïs COLIN 2025-03-06 15:06:31 +01:00
parent e2b6f6f943
commit 14dbabd6ea
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
2 changed files with 11 additions and 1 deletions

View file

@ -22,3 +22,12 @@ void assert_strequal(char *str1, char *str2)
ft_dprintf(STDERR_FILENO, "to eq \t[%s]\n", str2);
assert(ret == 0);
}
extern void __lsan_do_leak_check(void)
__attribute__((weak));
void do_leak_check(void)
{
if (__lsan_do_leak_check != NULL)
__lsan_do_leak_check();
}