r506: fixed a memory leak
This commit is contained in:
parent
9862a75cd3
commit
ce06188203
1
hit.c
1
hit.c
|
|
@ -211,6 +211,7 @@ void mm_select_sub(void *km, float pri_ratio, int min_diff, int best_n, int *n_,
|
|||
} else if ((r[i].score >= r[p].score * pri_ratio || r[i].score + min_diff >= r[p].score) && n_2nd < best_n) {
|
||||
if (!(r[i].qs == r[p].qs && r[i].qe == r[p].qe && r[i].rs == r[p].rs && r[i].re == r[p].re)) // not identical hits
|
||||
r[k++] = r[i], ++n_2nd;
|
||||
else if (r[i].p) free(r[i].p);
|
||||
} else if (r[i].p) free(r[i].p);
|
||||
}
|
||||
if (k != n) mm_sync_regs(km, k, r); // removing hits requires sync()
|
||||
|
|
|
|||
Loading…
Reference in New Issue