[virt-tools-list] [libosinfo 2/2] loader: Fix one newly introduced leak

Michal Privoznik mprivozn at redhat.com
Fri Dec 7 11:10:04 UTC 2012


On 07.12.2012 09:30, Christophe Fergeau wrote:
> This is a follow-up to my previous series fixing leaks as a similar
> one was just introduced.
> ---
>  osinfo/osinfo_loader.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c
> index 62b92f9..e630793 100644
> --- a/osinfo/osinfo_loader.c
> +++ b/osinfo/osinfo_loader.c
> @@ -961,8 +961,10 @@ static OsinfoDeviceDriver *osinfo_loader_driver(OsinfoLoader *loader,
>      }
>  
>      gint nnodes = osinfo_loader_nodeset("./*", ctxt, &nodes, err);
> -    if (error_is_set(err))
> +    if (error_is_set(err)) {
> +        g_object_unref(G_OBJECT(driver));
>          return NULL;
> +    }
>  
>      for (i = 0 ; i < nnodes ; i++) {
>          if (nodes[i]->children &&
> 

Fortunately, both these patches looks sane. ACK.

Michal




More information about the virt-tools-list mailing list