mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-22 01:59:26 +00:00
The beauty and horrors of the C - the compiler properly detects variable shadowing, but you can freely shadow a standard function 'free()' with variable called 'free'. And if you reference 'free()' just as 'free' you get the function pointer which means you can do also pointer arithmetics, so 'free > 0' is always valid even when you delete the local variable. Replace the local variables 'free' with a name that doesn't shadow the 'free()' function to prevent future hard to detect bugs.