From: nekral-guest Date: Sun, 15 Mar 2009 21:15:48 +0000 (+0000) Subject: * libmisc/cleanup.c: Fix del_cleanup. The arguments were not X-Git-Tag: 4.1.3~80 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9fda9f5c280be32da6d53c109d01b46ebabc48d0;p=shadow * libmisc/cleanup.c: Fix del_cleanup. The arguments were not desynchronized with the cleanup functions. * libmisc/cleanup.c: cleanup_function_args is an array of void pointer, not strings. --- diff --git a/ChangeLog b/ChangeLog index ee561d60..0608a7f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-03-15 Nicolas François + + * libmisc/cleanup.c: Fix del_cleanup. The arguments were not + desynchronized with the cleanup functions. + * libmisc/cleanup.c: cleanup_function_args is an array of void + pointer, not strings. + 2009-03-15 Nicolas François * libmisc/find_new_gid.c: Fix find_new_gid() the current group diff --git a/libmisc/cleanup.c b/libmisc/cleanup.c index b339a7e9..963c652d 100644 --- a/libmisc/cleanup.c +++ b/libmisc/cleanup.c @@ -39,7 +39,7 @@ */ #define CLEANUP_FUNCTIONS 10 static cleanup_function cleanup_functions[CLEANUP_FUNCTIONS]; -static const char * cleanup_function_args[CLEANUP_FUNCTIONS]; +static void * cleanup_function_args[CLEANUP_FUNCTIONS]; /* * - Cleanup functions shall not fail. @@ -113,8 +113,10 @@ void del_cleanup (cleanup_function pcf) if (i == (CLEANUP_FUNCTIONS -1)) { cleanup_functions[i] = NULL; + cleanup_function_args[i] = NULL; } else { cleanup_functions[i] = cleanup_functions[i+1]; + cleanup_function_args[i] = cleanup_function_args[i+1]; } /* A NULL indicates the end of the stack */