fix nt_terminate_process missing CloseHandle (#8294)
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
		
							parent
							
								
									be16f1be44
								
							
						
					
					
						commit
						ffac670f95
					
				| @ -2503,8 +2503,10 @@ fn nt_terminate_process(process_id: DWORD) -> ResultType<()> { | |||||||
|             if !h_token.is_null() { |             if !h_token.is_null() { | ||||||
|                 if f_nt_terminate_process(h_token, 1) == 0 { |                 if f_nt_terminate_process(h_token, 1) == 0 { | ||||||
|                     log::info!("terminate process {} success", process_id); |                     log::info!("terminate process {} success", process_id); | ||||||
|  |                     CloseHandle(h_token); | ||||||
|                     return Ok(()); |                     return Ok(()); | ||||||
|                 } else { |                 } else { | ||||||
|  |                     CloseHandle(h_token); | ||||||
|                     bail!("NtTerminateProcess {} failed", process_id); |                     bail!("NtTerminateProcess {} failed", process_id); | ||||||
|                 } |                 } | ||||||
|             } else { |             } else { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user