From 305e89e294ff02165abd6e5682dbe04575deba9d Mon Sep 17 00:00:00 2001 From: Larry <4461818+lzcohen@users.noreply.github.com> Date: Sat, 21 Dec 2024 20:27:58 +1100 Subject: [PATCH] Fixes cpcm not being deallocated in PluDecomposition --- src_python/ldpc/mod2/_mod2.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src_python/ldpc/mod2/_mod2.pyx b/src_python/ldpc/mod2/_mod2.pyx index 27d6d13..b04acb5 100755 --- a/src_python/ldpc/mod2/_mod2.pyx +++ b/src_python/ldpc/mod2/_mod2.pyx @@ -650,8 +650,8 @@ cdef class PluDecomposition(): self.Lmat = scipy.sparse.csr_matrix((0,0)) self.Umat = scipy.sparse.csr_matrix((0,0)) self.Pmat = scipy.sparse.csr_matrix((0,0)) - cdef GF2Sparse* cpcm = Py2GF2Sparse(pcm) - self.rr = new RowReduce(cpcm[0]) + self.cpcm = Py2GF2Sparse(pcm) + self.rr = new RowReduce(self.cpcm[0]) self._MEM_ALLOCATED = True self.full_reduce = full_reduce self.lower_triangular = full_reduce