From 3746c0a430ef27e3736f27c05a79b2e99d0d51c8 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Thu, 8 Dec 2011 14:47:20 +0000 Subject: [PATCH] zero out host memory on creation git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6728 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/enet/host.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/enet/host.c b/source/enet/host.c index c44f2ed3..0bca71c7 100755 --- a/source/enet/host.c +++ b/source/enet/host.c @@ -38,6 +38,7 @@ enet_host_create (const ENetAddress * address, size_t peerCount, size_t channelL host = (ENetHost *) enet_malloc (sizeof (ENetHost)); if (host == NULL) return NULL; + memset (host, 0, sizeof (ENetHost)); host -> peers = (ENetPeer *) enet_malloc (peerCount * sizeof (ENetPeer)); if (host -> peers == NULL)