mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Apply coccinelle script to replace malloc(a*b)->calloc(a,b)
This commit is contained in:
+1
-1
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user