Add a rule for another type of memory leak to find-mem-leak.cocci.

This commit is contained in:
Mansour Moufid 2015-02-17 13:40:48 -05:00
parent f81088bb80
commit 263438b071

View file

@ -7,3 +7,14 @@ statement S;
...
* if (x == NULL || y == NULL)
S
@@
expression x, y;
statement S;
@@
if (
* (x = polarssl_malloc(...)) == NULL
||
* (y = polarssl_malloc(...)) == NULL
)
S