[PATCH 1/3] nwfilter: Fix erroneous pointer passing to g_clear_pointer

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

 



From: Martin Kletzander <mkletzan@xxxxxxxxxx>

Commit 5de27c32a18f wanted to fix a possible double free, but by mistake
did not pass a reference to the variable.  This made virtnwfilterd
coredump in our daily CI build.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 src/nwfilter/nwfilter_gentech_driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter_gentech_driver.c
index 0c12b54b8029..1465734a54f8 100644
--- a/src/nwfilter/nwfilter_gentech_driver.c
+++ b/src/nwfilter/nwfilter_gentech_driver.c
@@ -203,12 +203,12 @@ virNWFilterInstReset(virNWFilterInst *inst)
 
     for (i = 0; i < inst->nfilters; i++)
         virNWFilterObjUnlock(inst->filters[i]);
-    g_clear_pointer(inst->filters, g_free);
+    g_clear_pointer(&inst->filters, g_free);
     inst->nfilters = 0;
 
     for (i = 0; i < inst->nrules; i++)
         virNWFilterRuleInstFree(inst->rules[i]);
-    g_clear_pointer(inst->rules, g_free);
+    g_clear_pointer(&inst->rules, g_free);
     inst->nrules = 0;
 }
 
-- 
2.49.0




[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