daemonq_return request: Clean up request queue and free all memory

before returning to die.
This commit is contained in:
Greg Lehey 1999-03-31 08:42:52 +00:00
parent e6bd890603
commit dbb49f899b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=45178

View file

@ -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);
}
}
}