Re: tools: Remove redundant NULL checks before free() (found by Smatch).
7 Sep
2006
7 Sep
'06
6:41 p.m.
I think the checks are necessary to be compatible with libc's on other platforms. -- Rob Shearman
7 Sep
7 Sep
7:05 p.m.
New subject: tools: Remove redundant NULL checks before free() (found by Smatch).
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(a)redhat.com Hauptstaetterstr. 58 http://www.redhat.de/ D-70178 Stuttgart
7039
Age (days ago)
7039
Last active (days ago)
1 comments
2 participants
participants (2)
-
Michael Stefaniuc -
Robert Shearman