Properly initialize ICAO cached addresses hash table.

This commit is contained in:
antirez 2013-01-26 01:15:15 +01:00
parent c2e79d4555
commit 11d8db0d38

View File

@ -294,7 +294,7 @@ void modesInit(void) {
/* Allocate the ICAO address cache. We use two uint32_t for every
* entry because it's a addr / timestamp pair for every entry. */
Modes.icao_cache = malloc(sizeof(uint32_t)*MODES_ICAO_CACHE_LEN*2);
memset(Modes.icao_cache,0,sizeof(Modes.icao_cache));
memset(Modes.icao_cache,0,sizeof(uint32_t)*MODES_ICAO_CACHE_LEN*2);
Modes.aircrafts = NULL;
Modes.interactive_last_update = 0;
if ((Modes.data = malloc(Modes.data_len)) == NULL ||