nwfilter: Fix memory leak on daemon init and shutdown

This patch fixes a memory leak on daemon init and shutdown. The module
was initialized twice and not shut down.
This commit is contained in:
Stefan Berger 2010-04-12 08:19:11 -04:00
parent 55d444cc10
commit c5337e8e43

View File

@ -176,6 +176,8 @@ nwfilterDriverShutdown(void) {
if (!driverState)
return -1;
virNWFilterLearnShutdown();
nwfilterDriverLock(driverState);
/* free inactive pools */
@ -421,6 +423,5 @@ static virStateDriver stateDriver = {
int nwfilterRegister(void) {
virRegisterNWFilterDriver(&nwfilterDriver);
virRegisterStateDriver(&stateDriver);
virNWFilterLearnInit();
return 0;
}