Coccinelle: Add free/kfree.cocci
authorNicolas Palix <npalix@diku.dk>
Tue, 24 Aug 2010 15:39:04 +0000 (17:39 +0200)
committerMichal Marek <mmarek@suse.cz>
Tue, 31 Aug 2010 09:37:53 +0000 (11:37 +0200)
commit43ba21b57a3e757000bfa8ccf46c81f232b4d881
treea4d8b0ab92c6739f430bb7f43cab8988d13dda9b
parent5c34050188f5e3db7f8137d819ecbb7d9327dd93
Coccinelle: Add free/kfree.cocci

Find a use after free.  Values of variables may imply that some
execution paths are not possible, resulting in false positives.
Another source of false positives are macros such as
SCTP_DBG_OBJCNT_DEC that do not actually evaluate their argument

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/coccinelle/free/kfree.cocci [new file with mode: 0644]