Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 59006f2

Browse files
author
Fabian Pedregosa
committed
release sv_coef memory
Fix by Brian Holt Conflicts: doc/whats_new.rst
1 parent b39e29f commit 59006f2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sklearn/svm/src/libsvm/libsvm_sparse_helper.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,8 @@ int free_model_SV(struct svm_csr_model *model)
400400
int i;
401401
for (i=model->l-1; i>=0; --i) free(model->SV[i]);
402402
/* svn_destroy_model frees model->SV */
403+
for (i=0; i < model->nr_class-1 ; ++i) free(model->sv_coef[i]);
404+
/* svn_destroy_model frees model->sv_coef */
403405
return 0;
404406
}
405407

0 commit comments

Comments
 (0)