diff options
author | Guilherme Maciel Ferreira | 2013-10-16 14:43:30 +0200 |
---|---|---|
committer | Denys Vlasenko | 2013-10-16 14:43:30 +0200 |
commit | 840ef17f63c85044c15d9a38a13c6539e26dfc31 (patch) | |
tree | 83c17eefba33cc8c01f9f6e461cc5603e988fd3e /networking | |
parent | 5117eff6f938a6daa269f965a52abc93b49d90d6 (diff) | |
download | busybox-840ef17f63c85044c15d9a38a13c6539e26dfc31.zip busybox-840ef17f63c85044c15d9a38a13c6539e26dfc31.tar.gz |
wget: if FEATURE_CLEAN_UP, free(ptr_to_globals)
Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/wget.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/networking/wget.c b/networking/wget.c index a32f852..cfbacec 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -89,6 +89,9 @@ struct globals { #define INIT_G() do { \ SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ } while (0) +#define FINI_G() do { \ + FREE_PTR_TO_GLOBALS(); \ +} while (0) /* Must match option string! */ @@ -1013,5 +1016,10 @@ int wget_main(int argc UNUSED_PARAM, char **argv) if (G.output_fd >= 0) xclose(G.output_fd); +#if ENABLE_FEATURE_CLEAN_UP && ENABLE_FEATURE_WGET_LONG_OPTIONS + free(G.extra_headers); +#endif + FINI_G(); + return EXIT_SUCCESS; } |