[libvirt] [PATCH] Don't leak delay string when freeing virInterfaceBridgeDefs

Laine Stump laine at laine.org
Tue Aug 3 14:40:26 UTC 2010


I noticed this while looking into checking the default bridge delay to 0.
---
 src/conf/interface_conf.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c
index 6430f7a..b24526f 100644
--- a/src/conf/interface_conf.c
+++ b/src/conf/interface_conf.c
@@ -84,6 +84,7 @@ void virInterfaceDefFree(virInterfaceDefPtr def)
 
     switch (def->type) {
         case VIR_INTERFACE_TYPE_BRIDGE:
+            VIR_FREE(def->data.bridge.delay);
             for (i = 0;i < def->data.bridge.nbItf;i++) {
                 if (def->data.bridge.itf[i] == NULL)
                     break; /* to cope with half parsed data on errors */
-- 
1.7.2




More information about the libvir-list mailing list