summaryrefslogtreecommitdiff
path: root/nis/nss_compat/compat-pwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nss_compat/compat-pwd.c')
-rw-r--r--nis/nss_compat/compat-pwd.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/nis/nss_compat/compat-pwd.c b/nis/nss_compat/compat-pwd.c
index df8f91eea0..669522f21a 100644
--- a/nis/nss_compat/compat-pwd.c
+++ b/nis/nss_compat/compat-pwd.c
@@ -116,16 +116,11 @@ init_nss_interface (void)
static void
give_pwd_free (struct passwd *pwd)
{
- if (pwd->pw_name != NULL)
- free (pwd->pw_name);
- if (pwd->pw_passwd != NULL)
- free (pwd->pw_passwd);
- if (pwd->pw_gecos != NULL)
- free (pwd->pw_gecos);
- if (pwd->pw_dir != NULL)
- free (pwd->pw_dir);
- if (pwd->pw_shell != NULL)
- free (pwd->pw_shell);
+ free (pwd->pw_name);
+ free (pwd->pw_passwd);
+ free (pwd->pw_gecos);
+ free (pwd->pw_dir);
+ free (pwd->pw_shell);
memset (pwd, '\0', sizeof (struct passwd));
}