diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-04-03 20:29:33 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-03 20:29:33 +0300 |
commit | aa3a2c2af600e6aea73df63c11a0eb88a00b6444 (patch) | |
tree | 39b29ea5b7d1662d747c6839f5d63f6a978c60ed | |
parent | 3583bf594db0c0459be8aaf26c81d15ffd4b4646 (diff) | |
parent | 87f16258367a3b9a62663b11f898a4a6f3c19d31 (diff) |
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
-rw-r--r-- | xdiff/xprepare.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xdiff/xprepare.c b/xdiff/xprepare.c index 63a22c630e..13b55aba74 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; |