diff options
author | Constantine A. Murenin <cnst@cvs.openbsd.org> | 2007-07-03 03:22:35 +0000 |
---|---|---|
committer | Constantine A. Murenin <cnst@cvs.openbsd.org> | 2007-07-03 03:22:35 +0000 |
commit | 0a59d0edad8c76adc08c3b5257694ed2cf27e899 (patch) | |
tree | f960b53115cad6d67c20a8400e96185e4fe1ac70 | |
parent | a5f33bde8d684335ecb9598b7ba80d873eba3fce (diff) |
fix a memory leak that was introduced in r1.20 on 2007-06-24T05Z; ok dlg
-rw-r--r-- | sys/kern/kern_sensors.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_sensors.c b/sys/kern/kern_sensors.c index 54384ee0e0a..6c804a6f178 100644 --- a/sys/kern/kern_sensors.c +++ b/sys/kern/kern_sensors.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sensors.c,v 1.20 2007/06/24 05:34:35 dlg Exp $ */ +/* $OpenBSD: kern_sensors.c,v 1.21 2007/07/03 03:22:34 cnst Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -217,6 +217,7 @@ sensor_task_unregister(struct sensor_task *st) st->state = ST_DYING; while (st->state != ST_DEAD) tsleep(st, 0, "stunr", 0); + free(st, M_DEVBUF); break; default: panic("sensor_task_unregister: unexpected state %d", @@ -227,7 +228,7 @@ sensor_task_unregister(struct sensor_task *st) void sensor_task_tick(void *arg) { - struct sensor_task *st = arg; + struct sensor_task *st = arg; /* try to schedule the task */ if (workq_add_task(NULL, 0, sensor_task_work, st, NULL) != 0) |