All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: "Git List" <git@vger.kernel.org>, "SZEDER Gábor" <szeder.dev@gmail.com>
Subject: Re: [PATCH] branch: let '--edit-description' default to rebased branch during rebase
Date: Sun, 12 Jan 2020 10:44:01 +0400	[thread overview]
Message-ID: <CAJ+F1CJP88PXP0vLtXQd82Z3RmX0uGic2NxBy3iSh0nBnRG0Vg@mail.gmail.com> (raw)
In-Reply-To: <CAPig+cRCMXjjPHc2O8fLmaSm9m-ZO3qR2BoZwG3s5dLHNbiFFQ@mail.gmail.com>

Hi Eric

On Sun, Jan 12, 2020 at 5:27 AM Eric Sunshine <sunshine@sunshineco.com> wrote:
>
> On Sat, Jan 11, 2020 at 9:55 AM Marc-André Lureau
> <marcandre.lureau@gmail.com> wrote:
> > On Sat, Jan 11, 2020 at 5:28 PM Eric Sunshine <sunshine@sunshineco.com> wrote:
> > > On Sat, Jan 11, 2020 at 7:36 AM <marcandre.lureau@redhat.com> wrote:
> > > > +                               if (wt_status_check_rebase(NULL, &state)) {
> > > > +                                       branch_name = state.branch;
> > > > +                               }
>
> Taking a deeper look at the code, I'm wondering it would make more
> sense to call wt_status_get_state(), which handles 'rebase' and
> 'bisect'. Is there a reason that you limited this check to only
> 'rebase'?

No reason, I just didn't try it yet. Done, thanks

>
> > > >                 if (edit_branch_description(branch_name))
> > > >                         return 1;
> > > > +
> > > > +               free(branch_name);
> > >
> > > That `return 1` just above this free() is leaking 'branch_name', isn't it?
> >
> > right, let's fix that too
>
> Looking at the code itself (rather than consulting only the patch), I
> see that there are a couple more early returns leaking 'branch_name',
> so they need to be handled, as well.

I think I covered them now, sending v4.

thanks

-- 
Marc-André Lureau

  reply	other threads:[~2020-01-12  6:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-11 12:35 [PATCH] branch: let '--edit-description' default to rebased branch during rebase marcandre.lureau
2020-01-11 13:26 ` Eric Sunshine
2020-01-11 14:54   ` Marc-André Lureau
2020-01-12  1:27     ` Eric Sunshine
2020-01-12  6:44       ` Marc-André Lureau [this message]
2020-01-12 12:14       ` SZEDER Gábor
2020-01-13  1:59         ` Eric Sunshine
2020-01-24 22:41           ` SZEDER Gábor
2020-01-30 21:37             ` Marc-André Lureau
2020-01-31 15:52               ` SZEDER Gábor
2020-01-31 15:59                 ` Marc-André Lureau
2020-01-31 16:16                   ` SZEDER Gábor
2020-02-06 22:26                     ` Marc-André Lureau
2020-02-07 10:02                       ` SZEDER Gábor
2020-02-07 14:16                         ` Marc-André Lureau
2020-02-07 18:57                           ` Junio C Hamano
2020-02-07 19:09                             ` Marc-André Lureau
2020-02-07 19:12                               ` Junio C Hamano
2020-02-07 19:29                                 ` Eric Sunshine
2020-02-07 20:14                                   ` Junio C Hamano

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=CAJ+F1CJP88PXP0vLtXQd82Z3RmX0uGic2NxBy3iSh0nBnRG0Vg@mail.gmail.com \
    --to=marcandre.lureau@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sunshine@sunshineco.com \
    --cc=szeder.dev@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.