On Fri, Apr 27, 2018 at 16:25:05 +0100, Daniel P. Berrangé wrote: > The filter parameters were not correctly free'd when an error hits while > adding to the hash table. > > Signed-off-by: Daniel P. Berrangé <[email protected]> > --- > src/nwfilter/nwfilter_gentech_driver.c | 22 ++++++---------------- > src/nwfilter/nwfilter_gentech_driver.h | 2 +- > 2 files changed, 7 insertions(+), 17 deletions(-) ... > diff --git a/src/nwfilter/nwfilter_gentech_driver.h > b/src/nwfilter/nwfilter_gentech_driver.h > index 67092157b8..86cc677e79 100644 > --- a/src/nwfilter/nwfilter_gentech_driver.h > +++ b/src/nwfilter/nwfilter_gentech_driver.h > @@ -57,7 +57,7 @@ int > virNWFilterInstantiateFilterLate(virNWFilterDriverStatePtr driver, > > int virNWFilterTeardownFilter(const virDomainNetDef *net); > > -virHashTablePtr virNWFilterCreateVarHashmap(char *macaddr, > +virHashTablePtr virNWFilterCreateVarHashmap(const char *macaddr, > const virNWFilterVarValue *value);
The alignment needs some adjustment. However, the function has no users outside nwfilter_gentech_driver.c so a separate patch could make it static. Reviewed-by: Jiri Denemark <[email protected]> -- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
