Re: [PATCH 2/8] revert: use run_command_v_opt() instead of execv_git_cmd()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 01 June 2010 06:01:15 Jonathan Nieder wrote:
> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]