diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-04-14 18:57:45 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-14 18:57:46 -0700 |
commit | 183ecc3e49dee55de349e2f0759aa4894b3623c7 (patch) | |
tree | 0aa46dab22e02fa45cc5ca6e4b914fbb6aad2585 /xdiff | |
parent | Merge branch 'gf/fetch-pack-direct-object-fetch' into maint (diff) | |
parent | xdiff/xprepare: fix a memory leak (diff) | |
download | tgif-183ecc3e49dee55de349e2f0759aa4894b3623c7.tar.xz |
Merge branch 'rj/xdiff-prepare-plug-leak-on-error-codepath' into maint
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; |