Use calloc

This commit is contained in:
angt
2016-01-31 08:27:51 +01:00
parent 7c0e8f6206
commit 8634b27969

2
mud.c
View File

@@ -119,7 +119,7 @@ void mud_new_addr (struct mud *mud, struct sockaddr_storage *addr, socklen_t add
static
void mud_new_sock (struct mud *mud, int fd, int family)
{
struct sock *sock = malloc(sizeof(struct sock));
struct sock *sock = calloc(1, sizeof(struct sock));
if (!sock)
return;