From: Nick Mathewson Date: Fri, 12 Nov 2010 18:05:58 +0000 (-0500) Subject: Avoid perma-blocking the controller on bug in shrink_freelist X-Git-Tag: tor-0.2.2.18-alpha~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dbba84c917279c8c58b1bfdac37fbcdfd84b7bb7;p=thirdparty%2Ftor.git Avoid perma-blocking the controller on bug in shrink_freelist In all likelihood, this bug would make Tor assert, but if it doesn't, let's not have two bugs. --- diff --git a/src/or/buffers.c b/src/or/buffers.c index 7c28dc1a47..d25ff64333 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -283,7 +283,7 @@ buf_shrink_freelists(int free_all) orig_n_to_skip, (int)freelists[i].alloc_size, orig_n_to_skip-n_to_skip, freelists[i].cur_length); assert_freelist_ok(&freelists[i]); - return; + goto done; } // tor_assert((*chp)->next); chp = &(*chp)->next; @@ -318,6 +318,7 @@ buf_shrink_freelists(int free_all) freelists[i].lowest_length = freelists[i].cur_length; assert_freelist_ok(&freelists[i]); } + done: enable_control_logging(); #else (void) free_all;