Skip to content

Commit

Permalink
Prevent memory leak if user calls VCF.close() (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjeffery authored Sep 20, 2023
1 parent ea49bf4 commit 8fec1c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cyvcf2/cyvcf2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ cdef class VCF(HTSFile):
contains = __contains__

def __dealloc__(self):
if self.hts != NULL and self.hdr != NULL:
if self.hdr != NULL:
bcf_hdr_destroy(self.hdr)
self.hdr = NULL
self.close()
Expand Down

0 comments on commit 8fec1c5

Please sign in to comment.