mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
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:
parent
55d444cc10
commit
c5337e8e43
@ -176,6 +176,8 @@ nwfilterDriverShutdown(void) {
|
|||||||
if (!driverState)
|
if (!driverState)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
virNWFilterLearnShutdown();
|
||||||
|
|
||||||
nwfilterDriverLock(driverState);
|
nwfilterDriverLock(driverState);
|
||||||
|
|
||||||
/* free inactive pools */
|
/* free inactive pools */
|
||||||
@ -421,6 +423,5 @@ static virStateDriver stateDriver = {
|
|||||||
int nwfilterRegister(void) {
|
int nwfilterRegister(void) {
|
||||||
virRegisterNWFilterDriver(&nwfilterDriver);
|
virRegisterNWFilterDriver(&nwfilterDriver);
|
||||||
virRegisterStateDriver(&stateDriver);
|
virRegisterStateDriver(&stateDriver);
|
||||||
virNWFilterLearnInit();
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user