1
0
Fork 0
frr/tools/coccinelle/ifnullxfree.cocci
Daniel Baumann 3124f89aed
Adding upstream version 10.1.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-05 10:03:58 +01:00

15 lines
317 B
Text

/// NULL check before some freeing functions is not needed.
///
// Copyright: (C) 2014 Fabian Frederick. GPLv2.
// Copyright: (C) 2019 Quentin Young. GPLv2.
// Comments: -
// Options: --no-includes --include-headers
virtual patch
@r2 depends on patch@
expression E;
expression Y;
@@
- if (E != NULL)
XFREE(Y, E);