]> git.proxmox.com Git - mirror_frr.git/blob - tools/coccinelle/ifnullxfree.cocci
Merge pull request #3899 from ton31337/fix/remove_private_as_with_local_as
[mirror_frr.git] / tools / coccinelle / ifnullxfree.cocci
1 /// NULL check before some freeing functions is not needed.
2 ///
3 // Copyright: (C) 2014 Fabian Frederick. GPLv2.
4 // Copyright: (C) 2019 Quentin Young. GPLv2.
5 // Comments: -
6 // Options: --no-includes --include-headers
7
8 virtual patch
9
10 @r2 depends on patch@
11 expression E;
12 expression Y;
13 @@
14 - if (E != NULL)
15 XFREE(Y, E);