log a pointer's value before calling free() on it. avoids technical UB.

found by GCC 12.
This commit is contained in:
mrg 2023-08-03 08:00:10 +00:00
parent e1c25a7623
commit 690d517445
1 changed files with 2 additions and 2 deletions

View File

@ -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 */