tools: Remove redundant NULL checks before free() (found
by Smatch).
Michael Stefaniuc
mstefani at redhat.com
Thu Sep 7 14:05:38 CDT 2006
Robert Shearman wrote:
>
> I think the checks are necessary to be compatible with libc's on other
> platforms.
No they aren't. free() doing nothing with NULL pointers is ANSI-C standard:
"free deallocates the space pointed to by p: it does nothing if p is NULL."
Quoted from "The C Programming Language" second edition by Kernighan and
Ritchie with the subtitle "ANSI C".
bye
michael
--
Michael Stefaniuc Tel.: +49-711-96437-199
Sr. Network Engineer Fax.: +49-711-96437-111
Red Hat GmbH Email: mstefani at redhat.com
Hauptstaetterstr. 58 http://www.redhat.de/
D-70178 Stuttgart
More information about the wine-devel
mailing list