diff --git a/Nodlink/Sysdig/caculate-weight.py b/Nodlink/Sysdig/caculate-weight.py index f730eebc1d6828abbb288f721cf3239b3e944bf9..78da01f28b6f7c901f82626095df2a1b4e90a4e3 100644 --- a/Nodlink/Sysdig/caculate-weight.py +++ b/Nodlink/Sysdig/caculate-weight.py @@ -66,6 +66,7 @@ def extract_process_feature(file_path,w2v): fileid2name.append(newname) file_freq[newname].add(id) + f.close() return file_vec, fileid2name, file_freq, id @@ -160,6 +161,7 @@ def extract_process_vec(file_path,tfidf, w2v, c2v): r = r * s tmp_process_vec.append(r.tolist()) + f.close() return process_vec, process_map, ground_truth