Opened 6 years ago

Closed 6 years ago

#12985 closed defect (fixed)

call tor_event_free, not tor_free, on events in connection_free().

Reported by: nickm Owned by:
Priority: Medium Milestone: Tor: 0.2.6.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-relay, 025-backport nickm-patch
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


In connection_free_, we do a probably-redundant call to tor_free on conn->read_event and conn->write_event.

This tor_free() is redundant (as we note in a comment) whenever we're calling connection_free_ from connection_free. But in one case -- the case where we're running connection_free_all -- we might get into trouble. We could free the event without first running event_del() on it.

Child Tickets

Change History (8)

comment:1 Changed 6 years ago by nickm

Apparently this was introduced in ac268a83408e1450544db2f23f364dfa3dee5042, when we moved connection_unregister up to connection_free() from connection_free_().

comment:2 Changed 6 years ago by nickm

Status: newneeds_review

see branch bug12984_024 for possible inclusion in 0.2.4, and branch bug12984_025 for inclusion in 0.2.5 and later.

comment:3 Changed 6 years ago by nickm

Closed #11315 as a duplicate of this.

comment:4 Changed 6 years ago by nickm

Keywords: nickm-patch added

Apply a nickm-patch keyword to tickets in needs_review in 0.2.6 where I wrote the patch, so I know which ones I can('t) review myself.

comment:5 Changed 6 years ago by nickm

Keywords: 024-backport removed

Clarified the changes file, and fixed the branch name. Merging to master. Marking for possible backport.

comment:6 Changed 6 years ago by nickm

Milestone: Tor: 0.2.6.x-finalTor: 0.2.5.x-final

comment:7 Changed 6 years ago by arma

If this is in the "probably harmless" category, I vote no backport.

Given that you picked 'minor bugfixes', I guess that it is?

comment:8 Changed 6 years ago by nickm

Milestone: Tor: 0.2.5.x-finalTor: 0.2.6.x-final
Resolution: fixed
Status: needs_reviewclosed

It's definitely harmless. Closing without backport.

Note: See TracTickets for help on using tickets.