Skip to content

Commit

Permalink
Plug some frontend training leaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tavian Barnes committed Oct 5, 2015
1 parent 9f52dfa commit 328f6b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/learn.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ static void learn_option_finish(learn_option_t* opt)
{
int i;

free(opt->logbase);
free(opt->model);
free(opt->algorithm);
free(opt->type);

for (i = 0;i < opt->num_params;++i) {
free(opt->params[i]);
Expand Down
3 changes: 3 additions & 0 deletions frontend/reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ int read_data(FILE *fpi, FILE *fpo, crfsuite_data_t* data, int group)
/* Unrecognized declaration. */
fprintf(fpo, "\n");
fprintf(fpo, "ERROR: unrecognized declaration: %s\n", token->attr);
iwa_delete(iwa);
return -1;
}
} else {
Expand Down Expand Up @@ -148,5 +149,7 @@ int read_data(FILE *fpi, FILE *fpo, crfsuite_data_t* data, int group)
progress(fpo, prev, 100);
fprintf(fpo, "\n");

iwa_delete(iwa);

return n;
}

0 comments on commit 328f6b3

Please sign in to comment.