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>
This commit is contained in:
1 parent
d870565117
commit
32814b69d0
1 file changed
+2
@@ -6,6 +6,8 @@ expression E;
|
||||
free(E);
|
||||
|
|
||||
commit_list_free(E);
|
||||
|
|
||||
FREE_AND_NULL(E);
|
||||
)
|
||||
|
||||
@@
|
||||
|
||||
Reference in new issue
Block a user