From 242269c12afc214da1c75954a3f5b167d2faba40 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 3 Jul 2019 12:37:36 +0100 Subject: [PATCH] [Minor] Zero pointer to avoid free issues --- src/lua/lua_kann.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lua/lua_kann.c b/src/lua/lua_kann.c index 609f05539b..e356f59128 100644 --- a/src/lua/lua_kann.c +++ b/src/lua/lua_kann.c @@ -1067,8 +1067,8 @@ lua_kann_train1 (lua_State *L) float **x, **y; /* Fill vectors */ - x = (float **)g_malloc (sizeof (float *) * n); - y = (float **)g_malloc (sizeof (float *) * n); + x = (float **)g_malloc0 (sizeof (float *) * n); + y = (float **)g_malloc0 (sizeof (float *) * n); for (int s = 0; s < n; s ++) { /* Inputs */ -- 2.47.3