mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 20:33:31 +01:00
test_cntev_append_cell_stats now no longer leaks
This commit is contained in:
parent
b4b07c17e3
commit
b11ab0d91d
@ -194,16 +194,17 @@ test_cntev_append_cell_stats(void *arg)
|
|||||||
|
|
||||||
done:
|
done:
|
||||||
tor_free(cp);
|
tor_free(cp);
|
||||||
|
smartlist_free(event_parts);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
test_cntev_format_cell_stats(void *arg)
|
test_cntev_format_cell_stats(void *arg)
|
||||||
{
|
{
|
||||||
char *event_string = NULL;
|
char *event_string = NULL;
|
||||||
origin_circuit_t *ocirc;
|
origin_circuit_t *ocirc = NULL;
|
||||||
or_circuit_t *or_circ;
|
or_circuit_t *or_circ = NULL;
|
||||||
cell_stats_t *cell_stats = NULL;
|
cell_stats_t *cell_stats = NULL;
|
||||||
channel_tls_t *n_chan, *p_chan;
|
channel_tls_t *n_chan=NULL, *p_chan=NULL;
|
||||||
(void)arg;
|
(void)arg;
|
||||||
|
|
||||||
n_chan = tor_malloc_zero(sizeof(channel_tls_t));
|
n_chan = tor_malloc_zero(sizeof(channel_tls_t));
|
||||||
@ -286,6 +287,10 @@ test_cntev_format_cell_stats(void *arg)
|
|||||||
done:
|
done:
|
||||||
tor_free(cell_stats);
|
tor_free(cell_stats);
|
||||||
tor_free(event_string);
|
tor_free(event_string);
|
||||||
|
tor_free(or_circ);
|
||||||
|
tor_free(ocirc);
|
||||||
|
tor_free(p_chan);
|
||||||
|
tor_free(n_chan);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TEST(name, flags) \
|
#define TEST(name, flags) \
|
||||||
|
Loading…
Reference in New Issue
Block a user