aboutsummaryrefslogtreecommitdiff
path: root/xdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-04-03 10:29:33 -0700
committerJunio C Hamano <gitster@pobox.com>2016-04-03 10:29:33 -0700
commitaa3a2c2af600e6aea73df63c11a0eb88a00b6444 (patch)
tree39b29ea5b7d1662d747c6839f5d63f6a978c60ed /xdiff
parent3583bf594db0c0459be8aaf26c81d15ffd4b4646 (diff)
parent87f16258367a3b9a62663b11f898a4a6f3c19d31 (diff)
downloadgit-aa3a2c2af600e6aea73df63c11a0eb88a00b6444.tar.gz
git-aa3a2c2af600e6aea73df63c11a0eb88a00b6444.tar.xz
Merge branch 'rj/xdiff-prepare-plug-leak-on-error-codepath'
A small memory leak in an error codepath has been plugged in xdiff code. * rj/xdiff-prepare-plug-leak-on-error-codepath: xdiff/xprepare: fix a memory leak xdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bits
Diffstat (limited to 'xdiff')
-rw-r--r--xdiff/xprepare.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xdiff/xprepare.c b/xdiff/xprepare.c
index 63a22c630..13b55aba7 100644
--- a/xdiff/xprepare.c
+++ b/xdiff/xprepare.c
@@ -301,10 +301,11 @@ int xdl_prepare_env(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
xdl_free_ctx(&xe->xdf2);
xdl_free_ctx(&xe->xdf1);
+ xdl_free_classifier(&cf);
return -1;
}
- if (!(xpp->flags & XDF_HISTOGRAM_DIFF))
+ if (XDF_DIFF_ALG(xpp->flags) != XDF_HISTOGRAM_DIFF)
xdl_free_classifier(&cf);
return 0;