terminology/scripts/coccinelle/free_stack.cocci

16 lines
135 B
Plaintext

// For fun, but gcc actually detects those by itself
@@
type T;
identifier K;
expression E;
@@
(
(
T K;
|
T K = E;
)
...
- free(&K);
)