mirror of
https://github.com/boostorg/build.git
synced 2026-02-13 12:22:17 +00:00
Fix atexit crashes because string for temp files got freed before they got used on the at exit file deletes.
[SVN r31658]
This commit is contained in:
@@ -59,11 +59,6 @@ file_info_t * file_info(char * filename)
|
||||
return finfo;
|
||||
}
|
||||
|
||||
void file_done()
|
||||
{
|
||||
hashdone( filecache_hash );
|
||||
}
|
||||
|
||||
static LIST * files_to_remove = L0;
|
||||
|
||||
static void remove_files_atexit(void)
|
||||
@@ -77,11 +72,13 @@ static void remove_files_atexit(void)
|
||||
}
|
||||
}
|
||||
|
||||
void file_done()
|
||||
{
|
||||
remove_files_atexit();
|
||||
hashdone( filecache_hash );
|
||||
}
|
||||
|
||||
void file_remove_atexit( const char * path )
|
||||
{
|
||||
if ( L0 == files_to_remove )
|
||||
{
|
||||
atexit(&remove_files_atexit);
|
||||
}
|
||||
files_to_remove = list_new( files_to_remove, newstr((char*)path) );
|
||||
}
|
||||
|
||||
@@ -509,10 +509,10 @@ int main( int argc, char **argv, char **arg_environ )
|
||||
/* Widely scattered cleanup */
|
||||
|
||||
var_done();
|
||||
file_done();
|
||||
donerules();
|
||||
donestamps();
|
||||
donestr();
|
||||
file_done();
|
||||
|
||||
/* close cmdout */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user