Skip to content

Commit

Permalink
Previous commit prematurely free'd the best match data
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanma committed Sep 27, 2024
1 parent b89b08f commit c58990a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions solver/solver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1358,8 +1358,11 @@ static void resolve_matches(kdtree_qres_t* krez, const double *field_xy,
if (solver_handle_hit(solver, &mo, NULL, FALSE))
solver->quit_now = TRUE;

sip_free(mo.sip);
mo.sip = NULL;
if (mo.sip != solver->best_match.sip)
{
sip_free(mo.sip);
mo.sip = NULL;
}

if (unlikely(solver->quit_now))
return;
Expand Down

0 comments on commit c58990a

Please sign in to comment.