[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: free(NULL) atexit (ITS#1014)

> It appears that some md5 code is registering a function via atexit() which will
> attempt to free NULL. For some reason the program doesn't die when this happens;
> perhaps it has something to do with the fact that it's already exiting. Anyway,
> here's the skinny:

free(NULL) is a NOP in C. Yes, it's buggy to rely on that, but I'm just
pointing out why it doesn't crash when this happens.

/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '