Skip to content

Improve DBC in isc_mem_free

Tony Finch requested to merge fanf-free-non-null into main

Unlike standard free(), isc_mem_free() is not a no-op when passed a NULL pointer. For size accounting purposes it calls sallocx(), which crashes when passed a NULL pointer. To get more helpful diagnostics, REQUIRE() that the pointer is not NULL so that when the programmer makes a mistake they get a backtrace that shows what went wrong.

Merge request reports