Skip to content

Commit

Permalink
fixed small memory leak, and double free of cigar
Browse files Browse the repository at this point in the history
  • Loading branch information
flouris authored and flouris committed Feb 17, 2015
1 parent 1ee63b8 commit 0bb8fb1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,7 @@ void cluster(char * dbname,
int msa_target_count = 0;
struct msa_target_s * msa_target_list =
(struct msa_target_s *) xmalloc(sizeof(struct msa_target_s) * size_max);
//memset(msa_target_list, 0, sizeof(struct msa_target_s)*size_max);

progress_init("Multiple alignments", seqcount);

Expand Down Expand Up @@ -1162,13 +1163,16 @@ void cluster(char * dbname,

if (fp_consout)
fclose(fp_consout);

free(msa_target_list);
}

/* free cigar strings for all aligned sequences */
/*
for(int i=0; i<seqcount; i++)
if (clusterinfo[i].cigar)
free(clusterinfo[i].cigar);

*/
free(clusterinfo);

if (opt_matched)
Expand Down

0 comments on commit 0bb8fb1

Please sign in to comment.