[tor-bugs] #24337 [Core Tor/Tor]: Every _free() function should be a macro that sets the corresponding pointer to NULL.
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Dec 6 21:04:30 UTC 2017
#24337: Every _free() function should be a macro that sets the corresponding
pointer to NULL.
----------------------------------------------+----------------------------
Reporter: nickm | Owner: nickm
Type: enhancement | Status:
| needs_review
Priority: Medium | Milestone: Tor:
| 0.3.3.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: review-group-26, review-group-27 | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
| Sponsor8-can
----------------------------------------------+----------------------------
Comment (by nickm):
FWIW, we currently have 87 FREE_AND_NULL() cases, and 18
FREE_AND_NULL_UNMATCHED() cases. Another option might be to rename (many
of) the remaining 18 types that have a free function that doesn't match
their type name. :)
I do agree that this is more complexity for making a foo_free() function
-- but I do think it is something we want to require.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24337#comment:15>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list