Commit 7a68964a authored by Brenden Blanco's avatar Brenden Blanco Committed by GitHub

Merge pull request #808 from goldshtn/close-table-fd-fix

cc, python: Clean up BPF module and tables
parents d31f845e c085977e
......@@ -120,6 +120,8 @@ BPFModule::~BPFModule() {
for (auto table : *tables_) {
if (table.is_shared)
SharedTables::instance()->remove_fd(table.name);
else
close(table.fd);
}
}
}
......
......@@ -1049,6 +1049,10 @@ class BPF(object):
self.detach_perf_event(ev_type, ev_config)
if self.tracefile:
self.tracefile.close()
self.tracefile = None
if self.module:
lib.bpf_module_destroy(self.module)
self.module = None
from .usdt import USDT
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment