From 840ef17f63c85044c15d9a38a13c6539e26dfc31 Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Wed, 16 Oct 2013 14:43:30 +0200 Subject: wget: if FEATURE_CLEAN_UP, free(ptr_to_globals) Signed-off-by: Guilherme Maciel Ferreira Signed-off-by: Denys Vlasenko --- include/libbb.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 3ab1d6b46..c96546109 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -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. -- cgit v1.2.3