1b83d1251e
A follow-up to the existing "type" rule added in an earlier change. This catches some occurrences that are missed by the previous rule. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
27 lines
218 B
Plaintext
27 lines
218 B
Plaintext
@@
|
|
expression E;
|
|
@@
|
|
- if (E)
|
|
free(E);
|
|
|
|
@@
|
|
expression E;
|
|
@@
|
|
- if (!E)
|
|
free(E);
|
|
|
|
@@
|
|
type T;
|
|
T *ptr;
|
|
@@
|
|
- free(ptr);
|
|
- ptr = NULL;
|
|
+ FREE_AND_NULL(ptr);
|
|
|
|
@@
|
|
expression E;
|
|
@@
|
|
- free(E);
|
|
- E = NULL;
|
|
+ FREE_AND_NULL(E);
|