From 1ca91bcdb588dc6c25d345f2411fdba314433732 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 11 Sep 2019 16:32:11 +0200 Subject: curl: fix memory leaked by parse_metalink() This commit fixes a regression introduced by curl-7_65_3-5-gb88940850. Detected by tests 2005, 2008, 2009, 2010, 2011, and 2012 with valgrind and libmetalink enabled. Closes #4326 --- src/tool_metalink.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/tool_metalink.h') diff --git a/src/tool_metalink.h b/src/tool_metalink.h index 1e367033c..f5ec306f7 100644 --- a/src/tool_metalink.h +++ b/src/tool_metalink.h @@ -105,6 +105,8 @@ extern const digest_params SHA256_DIGEST_PARAMS[1]; * Counts the resource in the metalinkfile. */ int count_next_metalink_resource(metalinkfile *mlfile); + +void delete_metalinkfile(metalinkfile *mlfile); void clean_metalink(struct OperationConfig *config); /* @@ -158,6 +160,7 @@ void metalink_cleanup(void); #else /* USE_METALINK */ #define count_next_metalink_resource(x) 0 +#define delete_metalinkfile(x) (void)x #define clean_metalink(x) (void)x /* metalink_cleanup() takes no arguments */ -- cgit v1.2.3