diff --git a/events/syscall/remove_bulk_data_from_disk.go b/events/syscall/remove_bulk_data_from_disk.go index f372b911..c773a8ef 100644 --- a/events/syscall/remove_bulk_data_from_disk.go +++ b/events/syscall/remove_bulk_data_from_disk.go @@ -27,6 +27,7 @@ var _ = events.Register(RemoveBulkDataFromDisk) func RemoveBulkDataFromDisk(h events.Helper) error { // Creates temporary data for testing, avoiding critical file deletion. tmpDir, err := os.MkdirTemp(os.TempDir(), "created-by-falco-event-generator") + defer os.RemoveAll(tmpDir) // clean up if err != nil { return err }