[libvirt] [PATCH] network: Need to free formatted addr in networkDnsmasqConfContents

Michal Privoznik mprivozn at redhat.com
Sun Aug 21 14:30:00 UTC 2016


On 20.08.2016 15:29, John Ferlan wrote:
> Commit id '0b6336c2' formatted the 'addr', but didn't VIR_FREE it.
> 
> Found by Coverity.
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  src/network/bridge_driver.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
> index 74f75d0..7b99aca 100644
> --- a/src/network/bridge_driver.c
> +++ b/src/network/bridge_driver.c
> @@ -969,6 +969,7 @@ networkDnsmasqConfContents(virNetworkObjPtr network,
>                  if (!addr)
>                      goto cleanup;
>                  virBufferAsprintf(&configbuf, "%s\n", addr);
> +                VIR_FREE(addr);
>              } else {
>                  /* "don't forward requests for this domain" */
>                  virBufferAddLit(&configbuf, "#\n");
> 

ACK

Michal




More information about the libvir-list mailing list