From 71dacd442d967fd901a8dcbc81e43417907428a3 Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Wed, 27 Jun 2018 18:01:51 +0200
Subject: [PATCH] hotfix: clear memory after allocation

---
 openair2/LAYER2/MAC/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c
index d32da8ac72..30ee279c94 100644
--- a/openair2/LAYER2/MAC/main.c
+++ b/openair2/LAYER2/MAC/main.c
@@ -62,6 +62,7 @@ void mac_top_init_eNB(void)
 		RC.mac =
 			(eNB_MAC_INST **) malloc16(RC.nb_macrlc_inst *
 						   sizeof(eNB_MAC_INST *));
+                bzero(RC.mac, RC.nb_macrlc_inst * sizeof(eNB_MAC_INST *));
         }
 	AssertFatal(RC.mac != NULL,
 		    "can't ALLOCATE %zu Bytes for %d eNB_MAC_INST with size %zu \n",
-- 
GitLab