Skip to content

Commit

Permalink
Don't try to free DLL on drop (#1089)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDenton authored Jun 7, 2024
1 parent 083c3c4 commit a6a928e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/windows/find_tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ mod impl_ {
use crate::windows::setup_config::SetupConfiguration;
use crate::windows::vs_instances::{VsInstances, VswhereInstance};
use crate::windows::windows_sys::{
FreeLibrary, GetMachineTypeAttributes, GetProcAddress, LoadLibraryA, UserEnabled, HMODULE,
GetMachineTypeAttributes, GetProcAddress, LoadLibraryA, UserEnabled, HMODULE,
IMAGE_FILE_MACHINE_AMD64, MACHINE_ATTRIBUTES, S_OK,
};
use std::convert::TryFrom;
Expand Down Expand Up @@ -211,12 +211,6 @@ mod impl_ {
}
}

impl Drop for LibraryHandle {
fn drop(&mut self) {
unsafe { FreeLibrary(self.0) };
}
}

type GetMachineTypeAttributesFuncType =
unsafe extern "system" fn(u16, *mut MACHINE_ATTRIBUTES) -> i32;
const _: () = {
Expand Down

0 comments on commit a6a928e

Please sign in to comment.