Skip to content

Commit 7db2fd3

Browse files
committed
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__
1 parent 53a55fd commit 7db2fd3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

netfilterqueue.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ cdef class NetfilterQueue:
170170
"""Destroy the queue."""
171171
if self.qh != NULL:
172172
nfq_destroy_queue(self.qh)
173+
self.qh = NULL
173174
# See warning about nfq_unbind_pf in __dealloc__ above.
174175

175176
def run(self):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy