diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index 76f76b61e64d..26f4a3ef9209 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -567,8 +567,9 @@ export_pam_environment(void) for (pp = environ_pam; *pp != NULL; pp++) { if (ok_to_export(*pp)) - putenv(*pp); - free(*pp); + (void)putenv(*pp); + else + free(*pp); } }