From 5cc3d2239fb14535eba8651f176901b7a968204f Mon Sep 17 00:00:00 2001 From: Jason Stajich Date: Tue, 6 Jul 2021 22:57:07 -0700 Subject: [PATCH 1/2] missing target object files from Makefile.simde to fix issue #779 --- Makefile.simde | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.simde b/Makefile.simde index 381a668..ae7ff4a 100644 --- a/Makefile.simde +++ b/Makefile.simde @@ -1,7 +1,7 @@ CFLAGS= -g -Wall -O2 -Wc++-compat #-Wextra CPPFLAGS= -DHAVE_KALLOC -DUSE_SIMDE -DSIMDE_ENABLE_NATIVE_ALIASES INCLUDES= -Ilib/simde -OBJS= kthread.o kalloc.o misc.o bseq.o sketch.o sdust.o options.o index.o chain.o align.o hit.o map.o format.o pe.o esterr.o splitidx.o \ +OBJS= kthread.o kalloc.o misc.o bseq.o sketch.o sdust.o options.o index.o lchain.o align.o hit.o map.o format.o pe.o seed.o esterr.o splitidx.o \ ksw2_extz2_simde.o ksw2_extd2_simde.o ksw2_exts2_simde.o ksw2_ll_simde.o PROG= minimap2 PROG_EXTRA= sdust minimap2-lite From 59488f02717e203e14906c77a714b9139b0f4441 Mon Sep 17 00:00:00 2001 From: Ryan Lim Date: Mon, 26 Jul 2021 17:48:37 -0400 Subject: [PATCH 2/2] call mm_idx_destroy at the end of loop to fix memory leak --- main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index f4167d8..481a7a8 100644 --- a/main.c +++ b/main.c @@ -406,7 +406,10 @@ int main(int argc, char *argv[]) if (mm_verbose >= 3) mm_idx_stat(mi); if (junc_bed) mm_idx_bed_read(mi, junc_bed, 1); if (alt_list) mm_idx_alt_read(mi, alt_list); - if (argc - (o.ind + 1) == 0) continue; // no query files + if (argc - (o.ind + 1) == 0) { + mm_idx_destroy(mi); + continue; // no query files + } ret = 0; if (!(opt.flag & MM_F_FRAG_MODE)) { for (i = o.ind + 1; i < argc; ++i) {