summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>1999-03-31 08:42:52 +0000
committergrog <grog@FreeBSD.org>1999-03-31 08:42:52 +0000
commit9c659047e89b56648e8745188dcc605c4a10fbce (patch)
tree29bc628c5e15b9bf939c941ad35b4d32b47212ab /sys
parentbe6c330b8c11dc4f3d21892db854629f44e2dc6a (diff)
downloadFreeBSD-src-9c659047e89b56648e8745188dcc605c4a10fbce.zip
FreeBSD-src-9c659047e89b56648e8745188dcc605c4a10fbce.tar.gz
daemonq_return request: Clean up request queue and free all memory
before returning to die.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/vinum/vinumdaemon.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/vinum/vinumdaemon.c b/sys/dev/vinum/vinumdaemon.c
index f02cf14..4800667 100644
--- a/sys/dev/vinum/vinumdaemon.c
+++ b/sys/dev/vinum/vinumdaemon.c
@@ -34,7 +34,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinumdaemon.c,v 1.3 1999/01/18 04:32:50 grog Exp grog $
+ * $Id: vinumdaemon.c,v 1.4 1999/03/16 03:40:59 grog Exp grog $
*/
#define REALLYKERNEL
@@ -132,6 +132,13 @@ vinum_daemon(void)
if (daemon_options & daemon_verbose)
log(LOG_INFO, "vinumd: stopping\n");
daemon_options |= daemon_stopped; /* note that we've stopped */
+ Free(request);
+ while (daemonq != NULL) { /* backed up requests, */
+ request = daemonq; /* get the request */
+ daemonq = daemonq->next; /* and detach it */
+ Free(request); /* then free it */
+ }
+ wakeup(&vinumclose); /* and wake any waiting vinum(8)s */
return;
case daemonrq_ping: /* tell the caller we're here */
@@ -148,7 +155,6 @@ vinum_daemon(void)
log(LOG_WARNING, "Invalid request\n");
break;
}
- Free(request);
}
}
}
OpenPOWER on IntegriCloud