Skip to content

Commit

Permalink
cleanup protein
Browse files Browse the repository at this point in the history
  • Loading branch information
horta committed Oct 25, 2023
1 parent 85bfeb9 commit bfd98e2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion c-core/press.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,14 @@ int press_close(struct press *press)
return rc_r ? rc_r : (rc_w ? rc_w : 0);
}

void press_del(struct press const *x) { free((void *)x); }
void press_del(struct press const *x)
{
if (x)
{
free((void *)x);
protein_cleanup((struct protein *)&x->protein);
}
}

static int finish_writer(struct press *press)
{
Expand Down

0 comments on commit bfd98e2

Please sign in to comment.