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>
This commit is contained in:
Guilherme Maciel Ferreira
2013-10-16 14:43:30 +02:00
committed by Denys Vlasenko
parent 5117eff6f9
commit 840ef17f63
2 changed files with 13 additions and 0 deletions

View File

@ -1773,6 +1773,11 @@ extern struct globals *const ptr_to_globals;
(*(struct globals**)&ptr_to_globals) = (void*)(x); \
barrier(); \
} while (0)
#define FREE_PTR_TO_GLOBALS() do { \
if (ENABLE_FEATURE_CLEAN_UP) { \
free(ptr_to_globals); \
} \
} while (0)
/* You can change LIBBB_DEFAULT_LOGIN_SHELL, but don't use it,
* use bb_default_login_shell and following defines.