Skip to content

Commit

Permalink
Fix segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen committed Jan 18, 2025
1 parent 10254a5 commit 7620c00
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libponyc/type/matchtype.c
Original file line number Diff line number Diff line change
Expand Up @@ -942,8 +942,9 @@ matchtype_t is_matchtype(ast_t* operand, ast_t* pattern, errorframe_t* errorf,

matchtype_t rslt = is_x_match_x(operand, consumed_pattern, errorf, true, opt);

// TODO this seems to segfault
//ast_free_unattached(consumed_pattern);
// TODO discuss with joe
if (consumed_pattern != pattern)
ast_free_unattached(consumed_pattern);

return rslt;
}
Expand Down

0 comments on commit 7620c00

Please sign in to comment.