summaryrefslogtreecommitdiffstats
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/nftables.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/py/nftables.py b/py/nftables.py
index 6891cb1c..f0716357 100644
--- a/py/nftables.py
+++ b/py/nftables.py
@@ -106,6 +106,9 @@ class Nftables:
self.nft_ctx_buffer_output(self.__ctx)
self.nft_ctx_buffer_error(self.__ctx)
+ def __del__(self):
+ self.nft_ctx_free(self.__ctx)
+
def __get_output_flag(self, name):
flag = self.output_flags[name]
return self.nft_ctx_output_get_flags(self.__ctx) & flag