aboutsummaryrefslogtreecommitdiff
path: root/apply.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2017-06-15 23:15:46 +0000
committerJunio C Hamano <gitster@pobox.com>2017-06-16 12:44:03 -0700
commit6a83d902073803c4141e02c53decf8c03e35da27 (patch)
tree209cf1639a325875240fce3e1f1cabbdb25878df /apply.c
parentcf9f49ea4817b36e93e64909a918a912cc32c28b (diff)
downloadgit-6a83d902073803c4141e02c53decf8c03e35da27.tar.gz
git-6a83d902073803c4141e02c53decf8c03e35da27.tar.xz
coccinelle: make use of the "type" FREE_AND_NULL() rule
Apply the result of the just-added coccinelle rule. This manually excludes a few occurrences, mostly things that resulted in many FREE_AND_NULL() on one line, that'll be manually fixed in a subsequent change. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/apply.c b/apply.c
index 854faa677..e78de0aff 100644
--- a/apply.c
+++ b/apply.c
@@ -3705,8 +3705,7 @@ static int check_preimage(struct apply_state *state,
is_new:
patch->is_new = 1;
patch->is_delete = 0;
- free(patch->old_name);
- patch->old_name = NULL;
+ FREE_AND_NULL(patch->old_name);
return 0;
}