Don't log free(NULL) calls.

This commit is contained in:
Simon Kelley committed 2026-01-25 12:16:48 +00:00
1 parent b148ba4752
commit f1fa05d754
1 file changed
+1 -1
+1 -1
View File
@@ -959,7 +959,7 @@ void *whine_realloc_real(const char *func, unsigned int line, void *ptr, size_t
void free_real(const char *func, unsigned int line, void *ptr)
{
if (option_bool(OPT_LOG_MALLOC))
if (ptr && option_bool(OPT_LOG_MALLOC))
my_syslog(LOG_INFO, _("free: %s:%u block at %x"), func, line, hash_ptr(ptr));
#undef free