Fix memory leak in error path of LOGISTIC REGRESSION