log a pointer's value before calling free() on it. avoids technical UB.
found by GCC 12.
This commit is contained in:
parent
e1c25a7623
commit
690d517445
|
@ -134,15 +134,15 @@ iscsi_malloc(unsigned n)
|
||||||
void
|
void
|
||||||
iscsi_free_atomic(void *ptr)
|
iscsi_free_atomic(void *ptr)
|
||||||
{
|
{
|
||||||
(void) free(ptr);
|
|
||||||
iscsi_trace(TRACE_MEM, "iscsi_free_atomic(%p)\n", ptr);
|
iscsi_trace(TRACE_MEM, "iscsi_free_atomic(%p)\n", ptr);
|
||||||
|
(void) free(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
iscsi_free(void *ptr)
|
iscsi_free(void *ptr)
|
||||||
{
|
{
|
||||||
(void) free(ptr);
|
|
||||||
iscsi_trace(TRACE_MEM, "iscsi_free(%p)\n", ptr);
|
iscsi_trace(TRACE_MEM, "iscsi_free(%p)\n", ptr);
|
||||||
|
(void) free(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* debugging levels */
|
/* debugging levels */
|
||||||
|
|
Loading…
Reference in New Issue