Opened 7 years ago

Closed 6 years ago

#9979 closed defect (fixed)

Redundant check in channel_tls_handle_incoming

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


In channel_tls_handle_incoming, we say:

  /* If we got one, we should register it */
  if (chan) channel_register(chan);

But chan can never be null here. Is this a copy-paste thing, or was there supposed to be some other check?

Child Tickets

Change History (3)

comment:1 Changed 6 years ago by nickm

Keywords: 024-backport added
Milestone: Tor: 0.2.4.x-finalTor: 0.2.5.x-final

comment:2 Changed 6 years ago by andrea

I think that's probably an artifact from the early version of channels where channel_listener_t wasn't a separate structure and incoming new channels worked a bit differently. It can be changed to just 'channel_register(chan);' without any problem.

comment:3 Changed 6 years ago by nickm

Resolution: fixed
Status: newclosed

Okay. I've pushed a fix to master as 040b478692c2355515eec626044ea2e3c37ca9c5, with an explanation of why I'd care. I think this doesn't need a backport.

Note: See TracTickets for help on using tickets.