Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bd4ef33

Browse files
committed
Merge pull request libgit2#3715 from pks-t/pks/xprepare-memleak
xprepare memleaks
2 parents 2f0450f + 6045afd commit bd4ef33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/xdiff/xprepare.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,10 +301,11 @@ int xdl_prepare_env(mmfile_t *mf1, mmfile_t *mf2, xpparam_t const *xpp,
301301

302302
xdl_free_ctx(&xe->xdf2);
303303
xdl_free_ctx(&xe->xdf1);
304+
xdl_free_classifier(&cf);
304305
return -1;
305306
}
306307

307-
if (!(xpp->flags & XDF_HISTOGRAM_DIFF))
308+
if (XDF_DIFF_ALG((xpp->flags) & XDF_HISTOGRAM_DIFF))
308309
xdl_free_classifier(&cf);
309310

310311
return 0;

0 commit comments

Comments
 (0)