From: Victor Julien Date: Wed, 20 Jan 2021 06:15:10 +0000 (+0100) Subject: qa/cocci: support FAIL macros in malloc check X-Git-Tag: suricata-7.0.0-beta1~1850 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80a3bbef3d77503e77efe801a453eb2dab54b20a;p=thirdparty%2Fsuricata.git qa/cocci: support FAIL macros in malloc check --- diff --git a/qa/coccinelle/malloc-error-check.cocci b/qa/coccinelle/malloc-error-check.cocci index b245189a23..96c09f0b85 100644 --- a/qa/coccinelle/malloc-error-check.cocci +++ b/qa/coccinelle/malloc-error-check.cocci @@ -52,6 +52,12 @@ if (x != NULL) S1 else S2 if (x && E1) S1 | BUG_ON(x == NULL) +| +FAIL_IF(x == NULL) +| +FAIL_IF(unlikely(x == NULL)) +| +FAIL_IF_NULL(x) )