From: Vsevolod Stakhov Date: Wed, 3 Jul 2019 11:37:36 +0000 (+0100) Subject: [Minor] Zero pointer to avoid free issues X-Git-Tag: 2.0~671 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=242269c12afc214da1c75954a3f5b167d2faba40;p=thirdparty%2Frspamd.git [Minor] Zero pointer to avoid free issues --- 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 */