[openssh-commits] [openssh] 01/04: Add #ifdefs in pwfree to match those in pwcopy.
git+noreply at mindrot.org
git+noreply at mindrot.org
Thu Sep 25 18:25:31 AEST 2025
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 1362f6c0f4ca3306a201a6572bb9ec0d47d8edb3
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Thu Sep 25 18:20:53 2025 +1000
Add #ifdefs in pwfree to match those in pwcopy.
Fixes build on many platforms.
---
misc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/misc.c b/misc.c
index a7a8f5b1b..239ed1238 100644
--- a/misc.c
+++ b/misc.c
@@ -532,8 +532,12 @@ pwfree(struct passwd *pw)
free(pw->pw_name);
freezero(pw->pw_passwd,
pw->pw_passwd == NULL ? 0 : strlen(pw->pw_passwd));
+#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
free(pw->pw_gecos);
+#endif
+#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
free(pw->pw_class);
+#endif
free(pw->pw_dir);
free(pw->pw_shell);
freezero(pw, sizeof(*pw));
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list