From 690d5174455c318c8bdc5818b004c24dd4e992d5 Mon Sep 17 00:00:00 2001 From: mrg Date: Thu, 3 Aug 2023 08:00:10 +0000 Subject: [PATCH] log a pointer's value before calling free() on it. avoids technical UB. found by GCC 12. --- external/bsd/iscsi/dist/src/lib/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/external/bsd/iscsi/dist/src/lib/util.c b/external/bsd/iscsi/dist/src/lib/util.c index a9f66ee80745..1dd883142855 100644 --- a/external/bsd/iscsi/dist/src/lib/util.c +++ b/external/bsd/iscsi/dist/src/lib/util.c @@ -134,15 +134,15 @@ iscsi_malloc(unsigned n) void iscsi_free_atomic(void *ptr) { - (void) free(ptr); iscsi_trace(TRACE_MEM, "iscsi_free_atomic(%p)\n", ptr); + (void) free(ptr); } void iscsi_free(void *ptr) { - (void) free(ptr); iscsi_trace(TRACE_MEM, "iscsi_free(%p)\n", ptr); + (void) free(ptr); } /* debugging levels */