Skip to content

Commit

Permalink
free() the seq/name memory at end
Browse files Browse the repository at this point in the history
  • Loading branch information
tseemann committed Sep 9, 2018
1 parent e8cba07 commit 7a812bc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <sys/stat.h>
#include "kseq.h"

#define VERSION "0.6.1"
#define VERSION "0.6.2"
#define EXENAME "snp-dists"
#define GITHUB_URL "https://github.com/tseemann/snp-dists"

Expand Down Expand Up @@ -162,6 +162,10 @@ int main(int argc, char *argv[])
}

// free memory
for (int k=0; k < N; k++) {
free(seq[k]);
free(name[k]);
}
free(seq); free(name);

return 0;
Expand Down

0 comments on commit 7a812bc

Please sign in to comment.