diff options
author | eihrul <eihrul> | 2011-12-08 14:20:54 +0000 |
---|---|---|
committer | eihrul <eihrul> | 2011-12-08 14:20:54 +0000 |
commit | e96c668702e118ad4377503fb9755eaaeca1785c (patch) | |
tree | d0a03e8f980413073480dfd80e3cbac79e3523d7 | |
parent | d4768414eba8ccdab6c654262fdbf8081adca5a7 (diff) | |
download | enet-e96c668702e118ad4377503fb9755eaaeca1785c.tar.gz enet-e96c668702e118ad4377503fb9755eaaeca1785c.zip |
zero out host memory on creation
-rw-r--r-- | host.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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) |