premake/contrib/mbedtls/scripts/find-mem-leak.cocci
2016-08-30 10:07:30 -07:00

21 lines
269 B
Plaintext

@@
expression x, y;
statement S;
@@
x = mbedtls_malloc(...);
y = mbedtls_malloc(...);
...
* if (x == NULL || y == NULL)
S
@@
expression x, y;
statement S;
@@
if (
* (x = mbedtls_malloc(...)) == NULL
||
* (y = mbedtls_malloc(...)) == NULL
)
S