Skip to content

Commit

Permalink
Some minor changes (#3)
Browse files Browse the repository at this point in the history
* Added Dockerfile

* Updated Readme.md

* fixed memory leak issue

---------

Co-authored-by: EgorGuga <[email protected]>
  • Loading branch information
EgorGuga and EgorGuga authored Sep 13, 2024
1 parent 17d0b65 commit 0b043ca
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sketch.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,9 @@ void read_vcf(mm_idx_t * mi, char * fname, mm128_v *p, char * contig_name)

bcf1_t *rec_tmp = bcf_dup(rec);
char * REF = (char *)calloc(mi->k + 1, sizeof(char));
strncpy(REF, rec->d.allele[0], mi->k + 1);
REF[mi->k + 1] = '\0';
strncpy(REF, rec->d.allele[0], sizeof(REF));
char * ALT = (char *)calloc(mi->k + 1, sizeof(char));
strncpy(ALT, rec->d.allele[1], mi->k + 1);
ALT[mi->k + 1] = '\0';
strncpy(ALT, rec->d.allele[1], sizeof(ALT));

insertatbegin((unsigned long)rec_tmp->pos, rec_tmp, rec_tmp->rid, REF, ALT);
bcf_empty(rec);
Expand Down

0 comments on commit 0b043ca

Please sign in to comment.