From 7db2fd300f581b4e17e0e15f507130d9f60acc02 Mon Sep 17 00:00:00 2001 From: remleduff Date: Thu, 16 Jul 2015 17:35:23 -0400 Subject: [PATCH] Prevent double-destroy of queue in __dealloc__ If the user calls unbind, the queue is destroyed. When the GC then runs again the queue is destroyed incorrectly in __dealloc__ --- netfilterqueue.pyx | 1 + 1 file changed, 1 insertion(+) diff --git a/netfilterqueue.pyx b/netfilterqueue.pyx index fa9e963..756654a 100644 --- a/netfilterqueue.pyx +++ b/netfilterqueue.pyx @@ -170,6 +170,7 @@ cdef class NetfilterQueue: """Destroy the queue.""" if self.qh != NULL: nfq_destroy_queue(self.qh) + self.qh = NULL # See warning about nfq_unbind_pf in __dealloc__ above. def run(self):