1
0
mirror of https://github.com/sjwhitworth/golearn.git synced 2025-05-01 22:18:10 +08:00

linear_models: try to fix a SIGABRT

This commit is contained in:
Richard Townsend 2017-04-10 01:02:45 +01:00
parent b94373553d
commit 550a82c83f

View File

@ -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;
}