cocci: FREE_AND_NULL(E) is safe to call on NULL

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 <gitster@pobox.com>
next
Junio C Hamano 2026-09-11 15:21:35 -07:00
parent d870565117
commit 32814b69d0
1 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,8 @@ expression E;
free(E);
|
commit_list_free(E);
|
FREE_AND_NULL(E);
)

@@