summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-11-21 15:14:38 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-11-21 15:14:38 -0800
commitd5e35329dd5305d611478e8d5076a8ca75e25f0d (patch)
tree36042e52cfb5dc66fd01f355950ad3c7d21252b8 /diff.c
parentMerge branch 'jk/rev-parse-end-of-options' (diff)
parentt7800: simplify difftool test (diff)
downloadtgif-d5e35329dd5305d611478e8d5076a8ca75e25f0d.tar.xz
Merge branch 'jk/diff-release-filespec-fix'
Running "git diff" while allowing external diff in a state with unmerged paths used to segfault, which has been corrected. * jk/diff-release-filespec-fix: t7800: simplify difftool test diff: allow passing NULL to diff_free_filespec_data()
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index d24f47df99..ace4a1d387 100644
--- a/diff.c
+++ b/diff.c
@@ -4115,6 +4115,9 @@ void diff_free_filespec_blob(struct diff_filespec *s)
void diff_free_filespec_data(struct diff_filespec *s)
{
+ if (!s)
+ return;
+
diff_free_filespec_blob(s);
FREE_AND_NULL(s->cnt_data);
}