*new* check_check_deref.c: checking for null inconsistently
commit631d5c9606ee627ad0510b8ef96b75184af9cdb0
authorDan Carpenter <error27@gmail.com>
Tue, 27 Apr 2010 09:56:06 +0000 (27 11:56 +0200)
committerDan Carpenter <error27@gmail.com>
Tue, 27 Apr 2010 09:56:06 +0000 (27 11:56 +0200)
tree81a2b6205e16013b23444538397185c1c530e2d4
parentc9a0929d3deaf39ea5822bce90e126706bf5ead4
*new* check_check_deref.c: checking for null inconsistently

This looks for bugs like this:
        if (a)
                a->foo = 42;
        a->bar = 7;

This was done already in check_null_deref.c but that had lots of false
positives because of the checking that happened in macros.

This doesn't have that problem but it still has false positives because
smatch doesn't do cross function analysis or because the parent pointer
gets reassigned like this:
if (foo->bar)
                 foo->bar->x = 42;
        foo = something();
        foo->bar->x = 99;

Signed-off-by: Dan Carpenter <error27@gmail.com>
check_check_deref.c [new file with mode: 0644]
check_list.h