libgit2/src/xdiff
Patrick Steinhardt 56da07cbcb xdiff/xprepare: fix a memory leak
The xdl_prepare_env() function may initialise an xdlclassifier_t
data structure via xdl_init_classifier(), which allocates memory
to several fields, for example 'rchash', 'rcrecs' and 'ncha'.
If this function later exits due to the failure of xdl_optimize_ctxs(),
then this xdlclassifier_t structure, and the memory allocated to it,
is not cleaned up.

In order to fix the memory leak, insert a call to xdl_free_classifier()
before returning.

This patch was originally written by Ramsay Jones (see commit
87f16258367a3b9a62663b11f898a4a6f3c19d31 in git.git).
2016-04-11 15:58:57 -04:00
..
xdiff.h xdiff: reference util.h in parent directory 2015-10-22 10:29:51 -04:00
xdiffi.c xdiff: convert size variables to size_t 2015-10-05 22:59:41 +02:00
xdiffi.h xdiff: upgrade to core git 2.4.5 2015-07-07 17:01:49 -05:00
xemit.c xdiff: cleanup some warnings 2015-07-10 09:41:56 -05:00
xemit.h xdiff: upgrade to core git 2.4.5 2015-07-07 17:01:49 -05:00
xhistogram.c xdiff: convert size variables to size_t 2015-10-05 22:59:41 +02:00
xinclude.h Check for _WIN32 instead of GIT_WIN32 or WIN32 to detect windows build environments 2012-04-21 18:45:32 +02:00
xmacros.h Import xdiff library from git 2012-03-02 15:49:28 -08:00
xmerge.c xdiff: fix memleak on error case 2016-03-01 08:56:23 +01:00
xpatience.c xdiff: upgrade to core git 2.4.5 2015-07-07 17:01:49 -05:00
xprepare.c xdiff/xprepare: fix a memory leak 2016-04-11 15:58:57 -04:00
xprepare.h Import xdiff library from git 2012-03-02 15:49:28 -08:00
xtypes.h Import xdiff library from git 2012-03-02 15:49:28 -08:00
xutils.c xdiff: upgrade to core git 2.4.5 2015-07-07 17:01:49 -05:00
xutils.h xdiff: upgrade to core git 2.4.5 2015-07-07 17:01:49 -05:00