Re: [PATCH 06/14] nwfilter: fix leaking of filter parameters upon error

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

 



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é <berrange@xxxxxxxxxx>
> ---
>  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 <jdenemar@xxxxxxxxxx>

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[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