Re: [PATCH 01/23] virDomainNetDefParseXML: Automatically free GHashTable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On a Tuesday in 2021, Peter Krempa wrote:
Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
src/conf/domain_conf.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index f88405ab02..25e504a99a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -10244,7 +10244,7 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt,
    xmlNodePtr vlan_node = NULL;
    xmlNodePtr bandwidth_node = NULL;
    xmlNodePtr tmpNode;
-    GHashTable *filterparams = NULL;
+    g_autoptr(GHashTable) filterparams = NULL;
    virDomainActualNetDef *actual = NULL;
    VIR_XPATH_NODE_AUTORESTORE(ctxt)
    virDomainChrSourceReconnectDef reconnect = {0};
@@ -10431,7 +10431,6 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt,

    if ((filterref_node = virXPathNode("./filterref", ctxt))) {
        filter = virXMLPropString(filterref_node, "filter");
-        virHashFree(filterparams);

This virHashFree is called with a NULL parameter since the refactor to
xpath in commit fdd06824e3a618ca33752e0439bbd5b2d9da1b0d

        filterparams = virNWFilterParseParamAttributes(filterref_node);
    }


Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx>

Jano

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux