fix possible leak source.

SVN revision: 51699
This commit is contained in:
Carsten Haitzler 2010-08-28 14:46:44 +00:00
parent 393c3fda9f
commit 2e96ecef81
1 changed files with 1 additions and 1 deletions

View File

@ -2329,9 +2329,9 @@ embryo_parameter_cell_array_push(Embryo_Program *ep, Embryo_Cell *cells, int num
Embryo_Param *pr;
Embryo_Cell *cell_array;
cell_array = malloc(num * sizeof(Embryo_Cell));
if ((!cells) || (num <= 0))
return embryo_parameter_cell_push(ep, 0);
cell_array = malloc(num * sizeof(Embryo_Cell));
ep->params_size++;
if (ep->params_size > ep->params_alloc)
{