Module Name: src
Committed By: riastradh
Date: Sat Apr 4 15:25:16 UTC 2015
Modified Files:
src/sys/dev/sysmon: sysmon_power.c
Log Message:
Free ped if we can't hand it to the power daemon.
Found by Brainy, reported by maxv@.
To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/sysmon/sysmon_power.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/sysmon/sysmon_power.c
diff -u src/sys/dev/sysmon/sysmon_power.c:1.49 src/sys/dev/sysmon/sysmon_power.c:1.50
--- src/sys/dev/sysmon/sysmon_power.c:1.49 Tue Jan 6 15:39:54 2015
+++ src/sys/dev/sysmon/sysmon_power.c Sat Apr 4 15:25:16 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_power.c,v 1.49 2015/01/06 15:39:54 bouyer Exp $ */
+/* $NetBSD: sysmon_power.c,v 1.50 2015/04/04 15:25:16 riastradh Exp $ */
/*-
* Copyright (c) 2007 Juan Romero Pardines.
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.49 2015/01/06 15:39:54 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.50 2015/04/04 15:25:16 riastradh Exp $");
#include "opt_compat_netbsd.h"
#include <sys/param.h>
@@ -800,6 +800,7 @@ sysmon_penvsys_event(struct penvsys_stat
if (sysmon_power_daemon_task(ped, pes, event) == 0)
return;
+ kmem_free(ped, sizeof(*ped));
}
switch (pes->pes_type) {
@@ -954,6 +955,7 @@ sysmon_pswitch_event(struct sysmon_pswit
if (sysmon_power_daemon_task(ped, smpsw, event) == 0)
return;
+ kmem_free(ped, sizeof(*ped));
}
switch (smpsw->smpsw_type) {