#24337: Every _free() function should be a macro that sets the corresponding
pointer to NULL.
------------------------------+--------------------------------
     Reporter:  nickm         |      Owner:  nickm
         Type:  enhancement   |     Status:  assigned
     Priority:  Medium        |  Milestone:  Tor: 0.3.3.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+--------------------------------
 Our tor_free() macros has saved us a bunch of trouble in the past by
 ensuring that once we've freed a pointer, that pointer gets set to NULL.

 Wouldn't it be cool if all of our free() calls did this?  It should make
 our code generally less error-prone.

 As we work on #23847, I bet we will find it extremely helpful.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24337>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Reply via email to