diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-08-13 10:36:06 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-08-13 10:39:56 -0400 |
commit | 2bfd92d0d170642fb12f53e5da208f318fdd632c (patch) | |
tree | 09da23f22e58e196fef9995e21b59aff3b555487 /src/or/rendcommon.c | |
parent | 5da821a8a3cfffc18f5a656852d98e69cff5dd8f (diff) | |
download | tor-2bfd92d0d170642fb12f53e5da208f318fdd632c.tar.gz tor-2bfd92d0d170642fb12f53e5da208f318fdd632c.zip |
Apply coccinelle script to replace malloc(a*b)->calloc(a,b)
Diffstat (limited to 'src/or/rendcommon.c')
-rw-r--r-- | src/or/rendcommon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index a664b5d501..aca9da198a 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -528,7 +528,7 @@ rend_encode_v2_descriptors(smartlist_t *descs_out, return -1; } /* Base64-encode introduction points. */ - ipos_base64 = tor_malloc_zero(ipos_len * 2); + ipos_base64 = tor_calloc(ipos_len, 2); if (base64_encode(ipos_base64, ipos_len * 2, ipos, ipos_len)<0) { log_warn(LD_REND, "Could not encode introduction point string to " "base64. length=%d", (int)ipos_len); |