Re: [PATCH 2/8] revert: use run_command_v_opt() instead of execv_git_cmd()
- From
Christian Couder <chriscool@tuxfamily.org>
- Date
- Jun 1, 2010, 04:33 UTC
- Message-ID
- <201006010633.08864.chriscool@tuxfamily.org>
- In-Reply-To
- <20100601040115.GA22401@progeny.tock>
On Tuesday 01 June 2010 06:01:15 Jonathan Nieder wrote:
Show 18 quoted lines
> Christian Couder wrote: > > diff --git a/builtin/revert.c b/builtin/revert.c > > index 5df0d69..9085894 100644 > > --- a/builtin/revert.c > > +++ b/builtin/revert.c > > @@ -530,7 +530,7 @@ static int revert_or_cherry_pick(int argc, const char > > **argv) args[i++] = defmsg; > > } > > args[i] = NULL; > > - return execv_git_cmd(args); > > + return run_command_v_opt(args, RUN_GIT_CMD); > > } > > free_message(&msg); > > free(defmsg); > > Doesn’t this leak msg and defmsg? Maybe it would make sense to free > the in-core copy of the commit message before the if (!no_commit) > block.
Yes, I will have a look at it.
Thanks, Christian.