mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-30 07:20:59 +00:00
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…
x
Reference in New Issue
Block a user