free can handle null pointers: if (foo) free(foo);
commit24c9b3c7e465d47e83d7fce2d2bbfca62c85465d
authorDan Carpenter <error27@gmail.com>
Wed, 25 Nov 2009 21:10:57 +0000 (25 23:10 +0200)
committerDan Carpenter <error27@gmail.com>
Wed, 25 Nov 2009 21:10:57 +0000 (25 23:10 +0200)
treea2a53bee17c57edd6a9e54a62f1e51758167f479
parent58add1f7951f5c587afea79efcd166f2fb09159b
free can handle null pointers:  if (foo) free(foo);

Print a message when code does unneeded checks for NULL before calling
free() or kfree() etc.

Signed-off-by: Dan Carpenter <error27@gmail.com>
check_redundant_null_check.c [new file with mode: 0644]
smatch.c
validation/sm_redundant_check.c [new file with mode: 0644]