Skip to content

Commit

Permalink
fix uv
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Hultman authored and Alex Hultman committed Mar 1, 2023
1 parent d370c08 commit 3bc1f9d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/flush.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ pub mod epoll_kqueue;
use epoll_kqueue::*;

#[cfg(LIBUS_USE_LIBUV)]
struct us_loop_t {
pub struct us_loop_t {

}

extern "C" {
Expand Down Expand Up @@ -93,10 +93,12 @@ pub unsafe extern "C" fn us_internal_loop_data_free(_loop: *mut us_loop_t) {
#[cfg(not(LIBUS_NO_SSL))]
us_internal_free_loop_ssl_data(_loop);

free((*_loop).data.recv_buf);
let loop_data = _loop as *mut us_internal_loop_data_t;

free((*loop_data).recv_buf);

us_timer_close((*_loop).data.sweep_timer);
us_internal_async_close((*_loop).data.wakeup_async);
us_timer_close((*loop_data).sweep_timer);
us_internal_async_close((*loop_data).wakeup_async);
}

#[no_mangle]
Expand Down

0 comments on commit 3bc1f9d

Please sign in to comment.