]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Correctly set magic numbers on ewma policy data/circuit data when allocating
authorAndrea Shepard <andrea@torproject.org>
Tue, 2 Oct 2012 03:30:33 +0000 (20:30 -0700)
committerAndrea Shepard <andrea@torproject.org>
Wed, 10 Oct 2012 07:44:47 +0000 (00:44 -0700)
src/or/circuitmux_ewma.c

index c918d6ff8a0c65762344450450db5dcdacf32790..9c26e1b2f356f04832a6f82d1c887c8e2420f956 100644 (file)
@@ -226,6 +226,7 @@ ewma_alloc_cmux_data(circuitmux_t *cmux)
   tor_assert(cmux);
 
   pol = tor_malloc_zero(sizeof(*pol));
+  pol->_base.magic = EWMA_POL_DATA_MAGIC;
   pol->active_circuit_pqueue = smartlist_new();
   pol->active_circuit_pqueue_last_recalibrated = cell_ewma_get_tick();
 
@@ -278,6 +279,7 @@ ewma_alloc_circ_data(circuitmux_t *cmux,
   pol = TO_EWMA_POL_DATA(pol_data);
 
   cdata = tor_malloc_zero(sizeof(*cdata));
+  cdata->_base.magic = EWMA_POL_CIRC_DATA_MAGIC;
   cdata->circ = circ;
 
   /*