mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 06:25:19 +00:00
qemu: plug memory leak
* src/qemu/qemu_driver.c (qemudShutdown): Free all strings and the ebtables structure. * src/libvirt_private.syms (ebtablesContextFree): Export missing symbol. * src/util/ebtables.c (ebtablesContextFree): Allow early exit.
This commit is contained in:
parent
6d0df64821
commit
428ea3a626
@ -326,6 +326,7 @@ virDomainConfVMNWFilterTeardown;
|
||||
# ebtables.h
|
||||
ebtablesAddForwardAllowIn;
|
||||
ebtablesAddForwardPolicyReject;
|
||||
ebtablesContextFree;
|
||||
ebtablesContextNew;
|
||||
ebtablesRemoveForwardAllowIn;
|
||||
|
||||
|
@ -2069,10 +2069,9 @@ qemudShutdown(void) {
|
||||
|
||||
virSysinfoDefFree(qemu_driver->hostsysinfo);
|
||||
|
||||
VIR_FREE(qemu_driver->securityDriverName);
|
||||
VIR_FREE(qemu_driver->logDir);
|
||||
VIR_FREE(qemu_driver->configDir);
|
||||
VIR_FREE(qemu_driver->autostartDir);
|
||||
VIR_FREE(qemu_driver->logDir);
|
||||
VIR_FREE(qemu_driver->stateDir);
|
||||
VIR_FREE(qemu_driver->libDir);
|
||||
VIR_FREE(qemu_driver->cacheDir);
|
||||
@ -2082,9 +2081,16 @@ qemudShutdown(void) {
|
||||
VIR_FREE(qemu_driver->vncListen);
|
||||
VIR_FREE(qemu_driver->vncPassword);
|
||||
VIR_FREE(qemu_driver->vncSASLdir);
|
||||
VIR_FREE(qemu_driver->saveImageFormat);
|
||||
VIR_FREE(qemu_driver->spiceTLSx509certdir);
|
||||
VIR_FREE(qemu_driver->spiceListen);
|
||||
VIR_FREE(qemu_driver->spicePassword);
|
||||
VIR_FREE(qemu_driver->hugetlbfs_mount);
|
||||
VIR_FREE(qemu_driver->hugepage_path);
|
||||
VIR_FREE(qemu_driver->securityDriverName);
|
||||
VIR_FREE(qemu_driver->saveImageFormat);
|
||||
VIR_FREE(qemu_driver->dumpImageFormat);
|
||||
|
||||
ebtablesContextFree(qemu_driver->ebtables);
|
||||
|
||||
if (qemu_driver->cgroupDeviceACL) {
|
||||
for (i = 0 ; qemu_driver->cgroupDeviceACL[i] != NULL ; i++)
|
||||
|
@ -300,6 +300,8 @@ ebtablesContextNew(const char *driver)
|
||||
void
|
||||
ebtablesContextFree(ebtablesContext *ctx)
|
||||
{
|
||||
if (!ctx)
|
||||
return;
|
||||
if (ctx->input_filter)
|
||||
ebtRulesFree(ctx->input_filter);
|
||||
if (ctx->forward_filter)
|
||||
|
Loading…
Reference in New Issue
Block a user