summaryrefslogtreecommitdiffstats
path: root/runtime/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/net.c')
-rw-r--r--runtime/net.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/runtime/net.c b/runtime/net.c
index ca12acd8..89e0838b 100644
--- a/runtime/net.c
+++ b/runtime/net.c
@@ -214,9 +214,8 @@ AddPermittedPeer(permittedPeers_t **ppRootPeer, uchar* pszID)
assert(ppRootPeer != NULL);
assert(pszID != NULL);
- CHKmalloc(pNew = malloc(sizeof(permittedPeers_t)));
+ CHKmalloc(pNew = calloc(1, sizeof(permittedPeers_t))); /* we use calloc() for consistency with "real" objects */
CHKmalloc(pNew->pszID = (uchar*)strdup((char*)pszID));
- pNew->pNext = NULL;
if(*ppRootPeer != NULL) {
pNew->pNext = *ppRootPeer;