[Libosinfo] [libosinfo PATCH] tree: Return after calling g_task_return_error()

Pino Toscano ptoscano at redhat.com
Wed Jul 17 10:42:26 UTC 2019


On Wednesday, 17 July 2019 12:18:26 CEST Fabiano Fidêncio wrote:
> Otherwise we'll end up reaching:
> g_task_return_error: assertion 'task->ever_returned' failed.
> 
> Signed-off-by: Fabiano Fidêncio <fidencio at redhat.com>
> ---
> This patch fixes the CI breakage with virt-manager and will be pushed
> soon.
> ---
>  osinfo/osinfo_tree.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/osinfo/osinfo_tree.c b/osinfo/osinfo_tree.c
> index 63604e8..1de68d2 100644
> --- a/osinfo/osinfo_tree.c
> +++ b/osinfo/osinfo_tree.c
> @@ -701,7 +701,7 @@ static void on_content_read(GObject *source,
>                                          &error)) {
>          g_prefix_error(&error, _("Failed to load .treeinfo|treeinfo content: "));
>          g_task_return_error(data->res, error);
> -        create_from_location_async_data_free(data);
> +        goto cleanup;
>      }
>  
>      if (!(ret = load_keyinfo(data->location,
> @@ -783,6 +783,7 @@ osinfo_tree_create_from_location_async_helper(CreateFromLocationAsyncData *data,
>                              _("URL protocol is not supported"));
>  
>          g_task_return_error(data->res, error);
> +        return;

The changes seems fine -- shouldn't there be:

        create_from_location_async_data_free(data);

before the return?

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libosinfo/attachments/20190717/0758ebdb/attachment.sig>


More information about the Libosinfo mailing list