diff --git a/src/nwfilter/nwfilter_gentech_driver.c b/src/nwfilter/nwfilter_gentech_driver.c index 41f270bb7c..0c12b54b80 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_free(inst->filters); + g_clear_pointer(inst->filters, g_free); inst->nfilters = 0; for (i = 0; i < inst->nrules; i++) virNWFilterRuleInstFree(inst->rules[i]); - g_free(inst->rules); + g_clear_pointer(inst->rules, g_free); inst->nrules = 0; }