Opened 20 months ago

Last modified 9 months ago

#29642 new enhancement

Free Windows library handles when we free_all in a module

Reported by: teor Owned by:
Priority: Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Minor Keywords: tor-windows, memory-management, technical-debt
Cc: Actual Points:
Parent ID: Points: 2
Reviewer: Sponsor:


Tor frees most resources on shutdown, using module *_free_all functions.

But we don't free Windows library handles.

Here's what we'd need to do:

  • write a generic function for freeing Windows library handles in winlib.c
  • call that function to free all the library handles, *after* we've finished using functions from those libraries

This change would only affect compat_time.c and ntmain.c. They don't currenly have *_free_all functions.

This is low-priority, because Windows libraries are reference-counted. And the two libraries that tor uses are needed for the life of the process.

For details, see

Child Tickets

#29643defectclosedteorFix an incorrect comment about calling FreeLibrary()

Change History (1)

comment:1 Changed 9 months ago by gaba

Sponsor: Sponsor31-can

No more sponsor 31. All this tickets remained open after sponsor 31 ended.

Note: See TracTickets for help on using tickets.