1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-12 17:36:08 +02:00

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
This commit is contained in:
Junio C Hamano 2016-04-14 18:57:45 -07:00
commit 183ecc3e49

View File

@ -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;