Added EINVAL to malloc