From: Junio C Hamano Date: Fri, 11 Sep 2026 22:21:35 GMT Subject: [PATCH] cocci: FREE_AND_NULL(E) is safe to call on NULL Message-ID: In-Reply-To: Just like we allow calling free(E) without checking if E is not NULL, it is safe to call FREE_AND_NULL(E) unconditionally. Signed-off-by: Junio C Hamano --- tools/coccinelle/free.cocci | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/coccinelle/free.cocci b/tools/coccinelle/free.cocci index 3dfaae9dd8..f2af140cfb 100644 --- a/tools/coccinelle/free.cocci +++ b/tools/coccinelle/free.cocci @@ -6,6 +6,8 @@ expression E; free(E); | commit_list_free(E); +| + FREE_AND_NULL(E); ) @@ -- 2.56.0-rc0-143-g1fea62d0ca