From f1fa05d754684229bc18443cb28e9c787d440c1e Mon Sep 17 00:00:00 2001 From: Simon Kelley Date: Sat, 24 Jan 2026 23:07:40 +0000 Subject: [PATCH] Don't log free(NULL) calls. --- src/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.c b/src/util.c index 40214b3..1f925e7 100644 --- a/src/util.c +++ b/src/util.c @@ -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