Skip to content

Commit

Permalink
proper cleanup of allocated memory
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermesena1 committed Sep 15, 2022
1 parent bca5f11 commit 3850f6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/StreamReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ FastqReader::is_eof() {
}

FastqReader::~FastqReader() {
free(filebuf);
fclose(fileobj);
}

Expand Down Expand Up @@ -714,6 +715,7 @@ GzFastqReader::is_eof() {
}

GzFastqReader::~GzFastqReader() {
free(gzbuf);
gzclose_r(fileobj);
}

Expand Down Expand Up @@ -827,6 +829,7 @@ SamReader::read_entry(FastqStats &stats, size_t &num_bytes_read) {
}

SamReader::~SamReader() {
free(filebuf);
fclose(fileobj);
}

Expand Down

0 comments on commit 3850f6e

Please sign in to comment.