From 2bfd92d0d170642fb12f53e5da208f318fdd632c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 13 Aug 2014 10:36:06 -0400 Subject: Apply coccinelle script to replace malloc(a*b)->calloc(a,b) --- src/or/cpuworker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/or/cpuworker.c') 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)); -- cgit v1.2.3-54-g00ecf