summaryrefslogtreecommitdiffstats
path: root/usr.bin/limits/limits.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/limits/limits.c')
-rw-r--r--usr.bin/limits/limits.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/limits/limits.c b/usr.bin/limits/limits.c
index 854803b..e976f36 100644
--- a/usr.bin/limits/limits.c
+++ b/usr.bin/limits/limits.c
@@ -399,8 +399,8 @@ main(int argc, char *argv[])
login_close(lc);
/* set leading environment variables, like eval(1) */
- while (*argv && strchr(*argv, '=') != NULL)
- (void)putenv(strdup(*argv++));
+ while (*argv && (p = strchr(*argv, '=')))
+ (void)setenv(*argv++, ++p, 1);
/* Set limits */
for (rcswhich = 0; rcswhich < RLIM_NLIMITS; rcswhich++) {
OpenPOWER on IntegriCloud