aboutsummaryrefslogtreecommitdiff
path: root/src/or/cpuworker.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-08-13 10:36:06 -0400
committerNick Mathewson <nickm@torproject.org>2014-08-13 10:39:56 -0400
commit2bfd92d0d170642fb12f53e5da208f318fdd632c (patch)
tree09da23f22e58e196fef9995e21b59aff3b555487 /src/or/cpuworker.c
parent5da821a8a3cfffc18f5a656852d98e69cff5dd8f (diff)
downloadtor-2bfd92d0d170642fb12f53e5da208f318fdd632c.tar.gz
tor-2bfd92d0d170642fb12f53e5da208f318fdd632c.zip
Apply coccinelle script to replace malloc(a*b)->calloc(a,b)
Diffstat (limited to 'src/or/cpuworker.c')
-rw-r--r--src/or/cpuworker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c
index 62af8e2f50..94138f8c1e 100644
--- a/src/or/cpuworker.c
+++ b/src/or/cpuworker.c
@@ -510,7 +510,7 @@ spawn_cpuworker(void)
connection_t *conn;
int err;
- fdarray = tor_malloc(sizeof(tor_socket_t)*2);
+ fdarray = tor_calloc(sizeof(tor_socket_t), 2);
if ((err = tor_socketpair(AF_UNIX, SOCK_STREAM, 0, fdarray)) < 0) {
log_warn(LD_NET, "Couldn't construct socketpair for cpuworker: %s",
tor_socket_strerror(-err));