It struck me that if I declare a chunk of memory using a const pointer, like so:
SomeType * const pointer = malloc(sizeof *pointer);
I don't get it. You still can forget to
On the downside you cannot set it to
0 after you freed it to indicate that it is already freed, so you may risk in calling
free twice (think of some error handling code to imagine where it can happen).
EDIT: Additionally, as @Dmitri said in the comments, declaring the pointer
const prevents you from reallocating it (by whatever means).