mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 17:31:46 -05:00
tool_metalink: introduce metalink_cleanup() in the internal API
... to release resources allocated at global scope
This commit is contained in:
parent
0af1a9d270
commit
cf75a64651
@ -773,4 +773,8 @@ void clean_metalink(struct Configurable *config)
|
|||||||
config->metalinkfile_last = 0;
|
config->metalinkfile_last = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void metalink_cleanup(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* USE_METALINK */
|
#endif /* USE_METALINK */
|
||||||
|
@ -144,6 +144,11 @@ int metalink_check_hash(struct Configurable *config,
|
|||||||
metalinkfile *mlfile,
|
metalinkfile *mlfile,
|
||||||
const char *filename);
|
const char *filename);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Release resources allocated at global scope.
|
||||||
|
*/
|
||||||
|
void metalink_cleanup(void);
|
||||||
|
|
||||||
#else /* USE_METALINK */
|
#else /* USE_METALINK */
|
||||||
|
|
||||||
#define count_next_metalink_resource(x) 0
|
#define count_next_metalink_resource(x) 0
|
||||||
|
@ -32,6 +32,11 @@
|
|||||||
#include "tool_operhlp.h"
|
#include "tool_operhlp.h"
|
||||||
#include "tool_version.h"
|
#include "tool_version.h"
|
||||||
|
|
||||||
|
#ifdef USE_METALINK
|
||||||
|
/* import the declaration of metalink_cleanup() */
|
||||||
|
# include "tool_metalink.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "memdebug.h" /* keep this as LAST include */
|
#include "memdebug.h" /* keep this as LAST include */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -215,6 +220,9 @@ void main_free(void)
|
|||||||
{
|
{
|
||||||
curl_global_cleanup();
|
curl_global_cleanup();
|
||||||
convert_cleanup();
|
convert_cleanup();
|
||||||
|
#ifdef USE_METALINK
|
||||||
|
metalink_cleanup();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CURLDEBUG
|
#ifdef CURLDEBUG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user