diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-04-03 10:29:33 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-03 10:29:33 -0700 |
commit | aa3a2c2af600e6aea73df63c11a0eb88a00b6444 (patch) | |
tree | 39b29ea5b7d1662d747c6839f5d63f6a978c60ed /xdiff | |
parent | Merge branch 'jc/index-pack' (diff) | |
parent | xdiff/xprepare: fix a memory leak (diff) | |
download | tgif-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.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; |