Fixed malloc issue in ecos_mex.c