[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #23676 [Core Tor/Tor]: kist on 0.3.2.1-alpha-dev beats its head against a wall trying to flush a conn that's closed
#23676: kist on 0.3.2.1-alpha-dev beats its head against a wall trying to flush a
conn that's closed
-------------------------------------------------+-------------------------
Reporter: arma | Owner: (none)
Type: defect | Status:
| needs_review
Priority: High | Milestone: Tor:
| 0.3.2.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: regression, cpu, tor-sched, 0.3.2.2 | Actual Points:
-alpha-must |
Parent ID: | Points:
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Comment (by arma):
Replying to [comment:7 pastly]:
> If you're picky like arma, and thus want the new function in one commit
and the bugfix in another, you will enjoy `bug23676_032_02`.
Ok, back we all go to remedial pointer school. What's wrong with this
function:
{{{
+static void
+add_chan_to_readd_list(smartlist_t *to_readd, channel_t *chan)
+{
+ if (!to_readd) {
+ to_readd = smartlist_new();
+ }
+ smartlist_add(to_readd, chan);
+}
}}}
Hint: what happens when the to_readd argument is NULL? We make a
smartlist_new, and assign it to this local variable, and then add
something to it, and then... we return?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23676#comment:15>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs