diff --git a/src/os/unix.rs b/src/os/unix.rs index 14dd702..34eace0 100644 --- a/src/os/unix.rs +++ b/src/os/unix.rs @@ -264,6 +264,7 @@ fn getpwuid(name: Name) -> Result { if result.is_null() { return Err(super::err_null_record()); } + passwd.assume_init() } #[cfg(target_os = "illumos")] @@ -278,9 +279,8 @@ fn getpwuid(name: Name) -> Result { if ret.is_null() { return Err(Error::last_os_error()); } + passwd.assume_init() } - - passwd.assume_init() }; // Extract names.