From 9b4e4786181bc20ea76814d07be606a9af656b6d Mon Sep 17 00:00:00 2001 From: njoly Date: Thu, 16 Dec 2010 16:08:57 +0000 Subject: 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. --- sys/dev/sysmon/sysmon_envsys.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/dev') 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 -__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 #include @@ -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", -- cgit