mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-10-01 01:26:08 -04:00
fix memory leak in windows ptr_lookup
This commit is contained in:
parent
0b0d9b5291
commit
fcf032e13e
@ -169,6 +169,7 @@ pub async fn ptr_lookup(ip_addr: IpAddr) -> EyreResult<String> {
|
||||
let c_str: &CStr = CStr::from_ptr(p_name_host.0 as *const i8);
|
||||
if let Ok(str_slice) = c_str.to_str() {
|
||||
let str_buf: String = str_slice.to_owned();
|
||||
DnsFree(Some(p_query_results as *const c_void), DnsFreeRecordList);
|
||||
return Ok(str_buf);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user