public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: Tom de Vries <tdevries@suse.de>, dwz@sourceware.org, jakub@redhat.com
Subject: Re: [PATCH] Fix assert after goto failure
Date: Tue, 02 Mar 2021 14:14:11 +0100	[thread overview]
Message-ID: <6f7e9bc184371711bd409aff2a5c744fc33355a1.camel@klomp.org> (raw)
In-Reply-To: <20210301124429.GA14163@delia>

Hi Tom,

On Mon, 2021-03-01 at 13:44 +0100, Tom de Vries wrote:
> This is because cleanup is not called.
> 
> Fix this by moving the failure label up one line.
> 
> Any comments?

This looks consistent with how the rest of the code paths calls cleanup
before returning an error.

Thanks,

Mark

> Fix assert after goto failure
> 
> 2021-03-01  Tom de Vries  <tdevries@suse.de>
> 
> 	* dwz.c (dwz): Move failure label to before cleanup.
> 
> ---
>  dwz.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dwz.c b/dwz.c
> index 8eb4f1d..d5fe7b1 100644
> --- a/dwz.c
> +++ b/dwz.c
> @@ -15434,8 +15434,8 @@ dwz (const char *file, const char *outfile,
> struct file_result *res,
>  	}
>        else if (write_aranges (dso))
>  	{
> -	  cleanup ();
>  	failure:
> +	  cleanup ();
>  	  ret = 1;
>  	}
>        else

      reply	other threads:[~2021-03-02 13:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01 12:44 Tom de Vries
2021-03-02 13:14 ` Mark Wielaard [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6f7e9bc184371711bd409aff2a5c744fc33355a1.camel@klomp.org \
    --to=mark@klomp.org \
    --cc=dwz@sourceware.org \
    --cc=jakub@redhat.com \
    --cc=tdevries@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).