aboutsummaryrefslogtreecommitdiff
path: root/src/or/onion.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-10-16 20:38:57 +0000
committerNick Mathewson <nickm@torproject.org>2004-10-16 20:38:57 +0000
commita42adce3628c9b82c91ff21e85c6a2d4fbcefc13 (patch)
treeb7f04f7a405e5638f21ad1fd86d77e216e517d75 /src/or/onion.c
parentb0afd91afec362e3edc58d1928d2a63bcb3097e8 (diff)
downloadtor-a42adce3628c9b82c91ff21e85c6a2d4fbcefc13.tar.gz
tor-a42adce3628c9b82c91ff21e85c6a2d4fbcefc13.zip
fix memory leak in router.c; start relying on NULL==(zero bytes)
svn:r2538
Diffstat (limited to 'src/or/onion.c')
-rw-r--r--src/or/onion.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/onion.c b/src/or/onion.c
index 0a1c264527..ada1749bf5 100644
--- a/src/or/onion.c
+++ b/src/or/onion.c
@@ -29,9 +29,8 @@ static int ol_length=0;
int onion_pending_add(circuit_t *circ) {
struct onion_queue_t *tmp;
- tmp = tor_malloc(sizeof(struct onion_queue_t));
+ tmp = tor_malloc_zero(sizeof(struct onion_queue_t));
tmp->circ = circ;
- tmp->next = NULL;
if(!ol_tail) {
tor_assert(!ol_list);