mirror of
https://github.com/curl/curl.git
synced 2026-05-05 21:17:27 +03:00
tool: call PL_ArenaFinish() on exit if NSPR is used
This prevents valgrind from reporting still reachable memory allocated by NSPR arenas (mainly the freelist). Reported-by: Hubert Kario
This commit is contained in:
parent
22eb00f937
commit
d343033f3d
1 changed files with 4 additions and 1 deletions
|
|
@ -210,9 +210,12 @@ static void main_free(struct GlobalConfig *config)
|
|||
convert_cleanup();
|
||||
metalink_cleanup();
|
||||
#ifdef USE_NSS
|
||||
if(PR_Initialized())
|
||||
if(PR_Initialized()) {
|
||||
/* prevent valgrind from reporting still reachable mem from NSRP arenas */
|
||||
PL_ArenaFinish();
|
||||
/* prevent valgrind from reporting possibly lost memory (fd cache, ...) */
|
||||
PR_Cleanup();
|
||||
}
|
||||
#endif
|
||||
free_config_fields(config);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue