Browse files

release sv_coef memory

Fix by Brian Holt

Conflicts:

	doc/whats_new.rst
  • Loading branch information...
1 parent b39e29f commit 59006f248f24b22f7a8a21ada85c8558b5a1d1b6 @fabianp fabianp committed Oct 6, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 sklearn/svm/src/libsvm/libsvm_sparse_helper.c
View
2 sklearn/svm/src/libsvm/libsvm_sparse_helper.c
@@ -400,6 +400,8 @@ int free_model_SV(struct svm_csr_model *model)
int i;
for (i=model->l-1; i>=0; --i) free(model->SV[i]);
/* svn_destroy_model frees model->SV */
+ for (i=0; i < model->nr_class-1 ; ++i) free(model->sv_coef[i]);
+ /* svn_destroy_model frees model->sv_coef */
return 0;
}

0 comments on commit 59006f2

Please sign in to comment.