Skip to content

Commit

Permalink
linear_models: try to fix a SIGABRT
Browse files Browse the repository at this point in the history
  • Loading branch information
Sentimentron committed Apr 10, 2017
1 parent b9d0ccd commit 6c80bdc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion linear_models/integration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@ void FreeCModel(struct model *m) {

/* free's a parameter via libsvm */
void FreeCParameter(struct parameter *p) {
destroy_param(p);
if (p->weight_label != nullptr) {
free(p->weight_label);
}
if (p->weight != nullptr) {
free(p->weight);
}
delete p;
}

Expand Down

0 comments on commit 6c80bdc

Please sign in to comment.