mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-27 07:03:15 -04:00
Fix use-after-free in XConnection::get_output_info (#1211)
This commit is contained in:
committed by
Osspial
parent
42e0ccfa1c
commit
2d41a7d1b0
@@ -99,7 +99,8 @@ impl XConnection {
|
||||
// video mode is returned to the user
|
||||
monitor: None,
|
||||
}
|
||||
});
|
||||
})
|
||||
.collect();
|
||||
|
||||
let name_slice = slice::from_raw_parts(
|
||||
(*output_info).name as *mut u8,
|
||||
@@ -119,7 +120,7 @@ impl XConnection {
|
||||
};
|
||||
|
||||
(self.xrandr.XRRFreeOutputInfo)(output_info);
|
||||
Some((name, hidpi_factor, modes.collect()))
|
||||
Some((name, hidpi_factor, modes))
|
||||
}
|
||||
pub fn set_crtc_config(&self, crtc_id: RRCrtc, mode_id: RRMode) -> Result<(), ()> {
|
||||
unsafe {
|
||||
|
||||
Reference in New Issue
Block a user