From 57daa3388cbb688a4c596456e9d4473ee1cacc53 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 3 Jun 2008 18:40:55 +0200 Subject: bugfix: part of permittedPeer structure was not correctly initialized thanks to varmojfekoj for spotting this --- runtime/net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'runtime/net.c') 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; -- cgit