Add a semantic patch to find potential memory leaks.
This commit is contained in:
parent
bd1d44e251
commit
961c626d6d
9
scripts/find-mem-leak.cocci
Normal file
9
scripts/find-mem-leak.cocci
Normal file
@ -0,0 +1,9 @@
|
||||
@@
|
||||
expression x, y;
|
||||
statement S;
|
||||
@@
|
||||
x = polarssl_malloc(...);
|
||||
y = polarssl_malloc(...);
|
||||
...
|
||||
* if (x == NULL || y == NULL)
|
||||
S
|
Loading…
Reference in New Issue
Block a user