diff options
author | George Kadianakis <desnacked@riseup.net> | 2012-09-06 01:22:32 +0300 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2012-09-06 01:22:32 +0300 |
commit | 8284c2bcba4d8daecf5416fa88324212c5fc17ea (patch) | |
tree | 0266d579793c499b69e00bbbbd188d237c49d9a8 /src/or/connection_or.c | |
parent | c77d1b7bda554d80c309c1d448d32f3220537b4f (diff) | |
download | tor-8284c2bcba4d8daecf5416fa88324212c5fc17ea.tar.gz tor-8284c2bcba4d8daecf5416fa88324212c5fc17ea.zip |
Use tor_malloc_zero() in var_cell_new().
This is just a precaution; we seem to be using var_cell_t.payload and
var_cell_t.payload_len correctly at the moment.
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r-- | src/or/connection_or.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c index da27cba32d..5a3b6205a9 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -327,7 +327,7 @@ var_cell_t * var_cell_new(uint16_t payload_len) { size_t size = STRUCT_OFFSET(var_cell_t, payload) + payload_len; - var_cell_t *cell = tor_malloc(size); + var_cell_t *cell = tor_malloc_zero(size); cell->payload_len = payload_len; cell->command = 0; cell->circ_id = 0; |