diff --git a/src/detections/pivot.rs b/src/detections/pivot.rs index 391590c0..c732ddfa 100644 --- a/src/detections/pivot.rs +++ b/src/detections/pivot.rs @@ -57,7 +57,7 @@ pub fn insert_pivot_keyword(event_record: &Value) { } else { return; } - let mut pivots = PIVOT_KEYWORD.write().unwrap(); + let mut pivots = PIVOT_KEYWORD.write().unwrap().clone(); for (_, pivot) in pivots.iter_mut() { for field in &pivot.fields { if let Some(array_str) = configs::EVENTKEY_ALIAS.get_event_key(&String::from(field)) { diff --git a/src/detections/print.rs b/src/detections/print.rs index de607eec..0f83b02e 100644 --- a/src/detections/print.rs +++ b/src/detections/print.rs @@ -252,7 +252,7 @@ impl AlertMessage { .as_bytes(), ) .ok(); - let error_logs = ERROR_LOG_STACK.lock().unwrap(); + let error_logs = ERROR_LOG_STACK.lock().unwrap().clone(); for error_log in error_logs.iter() { writeln!(error_log_writer, "{}", error_log).ok(); }