~mort/coffeepaste

f4fe5b004575e1723a6bf0a411218a6a8fed9517 — Martin Dørum 2 years ago 3ef9215
fix memory issue with C string
1 files changed, 2 insertions(+), 1 deletions(-)

M src/purge.rs
M src/purge.rs => src/purge.rs +2 -1
@@ 28,7 28,8 @@ pub fn update_access(fd: unix::io::RawFd, mtime: time::SystemTime)

    unsafe {
        if libc::futimes(fd as libc::c_int, times.as_ptr()) < 0 {
            libc::perror(std::ffi::CString::new("update_access: futimes").unwrap().as_ptr());
            let cstr = std::ffi::CString::new("update_access: futimes").unwrap();
            libc::perror(cstr.as_ptr());
        }
    };