diff --git a/src/teamspeak2.c b/src/teamspeak2.c
index 0e683ce9fc42cb17a3f18802904f90df94bc4bfd..263863b93c8a695e002191fa70cc306d70b30fbb 100644 (file)
--- a/src/teamspeak2.c
+++ b/src/teamspeak2.c
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/types.h>
-#include <sys/socket.h>
#include <netdb.h>
/*
#include <netdb.h>
/*
}
/* Allocate memory */
}
/* Allocate memory */
- entry = (vserver_list_t *) malloc (sizeof (vserver_list_t));
+ entry = calloc (1, sizeof (*entry));
if (entry == NULL)
{
if (entry == NULL)
{
- ERROR ("teamspeak2 plugin: malloc failed.");
+ ERROR ("teamspeak2 plugin: calloc failed.");
return (-1);
}
return (-1);
}
- memset (entry, 0, sizeof (vserver_list_t));
/* Save data */
entry->port = vserver_port;
/* Save data */
entry->port = vserver_port;