Hi Adam, Adam Wolk writes: > So how should I interpret this in relation to the above commit messages? > > 1) double free is safe, no need for null checks > 2) double free is detected by OpenBSD, no need for null checks we will > kill your program > 3) double free is unsafe, avoid double free > > I would like to think that (2) is true. Though reading the man page > makes an initial impression (at least for me) that (3) is true and could > lead to people following the rule of null checking before a free call? > > Should the man page be altered to discouraged the use of null checks > before calls to free?
Double free is absolutely unsafe. Null checks are unnecessary. I *think* you're assuming that freeing a pointer sets it to null. This is not the case. -- Anthony J. Bentley