r506: fixed a memory leak

This commit is contained in:
Heng Li 2017-10-12 10:12:22 -04:00
parent 9862a75cd3
commit ce06188203
2 changed files with 2 additions and 1 deletions

1
hit.c
View File

@ -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()

2
main.c
View File

@ -6,7 +6,7 @@
#include "mmpriv.h"
#include "getopt.h"
#define MM_VERSION "2.2-r505-dirty"
#define MM_VERSION "2.2-r506-dirty"
#ifdef __linux__
#include <sys/resource.h>