From 9c659047e89b56648e8745188dcc605c4a10fbce Mon Sep 17 00:00:00 2001 From: grog Date: Wed, 31 Mar 1999 08:42:52 +0000 Subject: [PATCH] daemonq_return request: Clean up request queue and free all memory before returning to die. --- sys/dev/vinum/vinumdaemon.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/dev/vinum/vinumdaemon.c b/sys/dev/vinum/vinumdaemon.c index f02cf14c5bc3..4800667cda32 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); } } }