diff options
| author | njoly <njoly@NetBSD.org> | 2010-12-16 16:08:57 +0000 |
|---|---|---|
| committer | njoly <njoly@NetBSD.org> | 2010-12-16 16:08:57 +0000 |
| commit | 9b4e4786181bc20ea76814d07be606a9af656b6d (patch) | |
| tree | 5b8029fe90bde2790b601bd25257623167c4347e /sys/dev/sysmon | |
| parent | 7c2bdb060193d0b8ccfe4314ebe1a01452038b50 (diff) | |
Be sure to always initialize props variable to a sensible value.
Fix a problem with envstat -S call which was installing bogus/random
limits.
ok pgoyette.
Diffstat (limited to 'sys/dev/sysmon')
| -rw-r--r-- | sys/dev/sysmon/sysmon_envsys.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/sysmon/sysmon_envsys.c b/sys/dev/sysmon/sysmon_envsys.c index 859f1d7b41f..9ecc65152d9 100644 --- a/sys/dev/sysmon/sysmon_envsys.c +++ b/sys/dev/sysmon/sysmon_envsys.c @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys.c,v 1.110 2010/12/15 17:17:16 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsys.c,v 1.111 2010/12/16 16:08:57 njoly Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -64,7 +64,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.110 2010/12/15 17:17:16 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.111 2010/12/16 16:08:57 njoly Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -1136,6 +1136,7 @@ sme_remove_userprops(void) /* * Next, we need to retrieve those initial limits. */ + props = 0; edata->upropset &= ~PROP_LIMITS; if (sme->sme_get_limits) { DPRINTF(("%s: retrieve limits for %s %s\n", |
