From 8fec1c573b9b2d77ad8d21a0644c03fb44200c5d Mon Sep 17 00:00:00 2001 From: Ben Jeffery Date: Wed, 20 Sep 2023 07:00:58 +0100 Subject: [PATCH] Prevent memory leak if user calls VCF.close() (#280) --- cyvcf2/cyvcf2.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyvcf2/cyvcf2.pyx b/cyvcf2/cyvcf2.pyx index c9da11c..bba9141 100644 --- a/cyvcf2/cyvcf2.pyx +++ b/cyvcf2/cyvcf2.pyx @@ -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()