Skip to content

Commit 961c626

Browse files
committed
Add a semantic patch to find potential memory leaks.
1 parent bd1d44e commit 961c626

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/find-mem-leak.cocci

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@@
2+
expression x, y;
3+
statement S;
4+
@@
5+
x = polarssl_malloc(...);
6+
y = polarssl_malloc(...);
7+
...
8+
* if (x == NULL || y == NULL)
9+
S

0 commit comments

Comments
 (0)