Skip to content

Commit 263438b

Browse files
committed
Add a rule for another type of memory leak to find-mem-leak.cocci.
1 parent f81088b commit 263438b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/find-mem-leak.cocci

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,14 @@ statement S;
77
...
88
* if (x == NULL || y == NULL)
99
S
10+
11+
@@
12+
expression x, y;
13+
statement S;
14+
@@
15+
if (
16+
* (x = polarssl_malloc(...)) == NULL
17+
||
18+
* (y = polarssl_malloc(...)) == NULL
19+
)
20+
S

0 commit comments

Comments
 (0)