summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6486a84)
raw | patch | inline | side by side (parent: 6486a84)
author | Tay Ray Chuan <rctay89@gmail.com> | |
Wed, 31 Aug 2011 04:48:46 +0000 (12:48 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 31 Aug 2011 17:03:51 +0000 (10:03 -0700) |
Ensure that the xdl_free_classifier() call on xdlclassifier_t cf is safe
even if xdl_init_classifier() isn't called. This may occur in the case
where diff is run with --histogram and a call to, say, xdl_prepare_ctx()
fails.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
even if xdl_init_classifier() isn't called. This may occur in the case
where diff is run with --histogram and a call to, say, xdl_prepare_ctx()
fails.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff/xprepare.c | patch | blob | history |
diff --git a/xdiff/xprepare.c b/xdiff/xprepare.c
index 620fc9a657e2246d3a382c916c2cdd4f820c0c44..5b676b7ca5c7d5e8b27b594f3ca8f008cc031fad 100644 (file)
--- a/xdiff/xprepare.c
+++ b/xdiff/xprepare.c
long enl1, enl2, sample;
xdlclassifier_t cf;
+ memset(&cf, 0, sizeof(cf));
+
/*
* For histogram diff, we can afford a smaller sample size and
* thus a poorer estimate of the number of lines, as the hash