On Tuesday 01 June 2010 11:03:17 Jonathan Nieder wrote: > Christian Couder wrote: > > --- a/builtin/revert.c > > +++ b/builtin/revert.c > > @@ -520,8 +516,33 @@ static int do_pick_commit() > > return 0; > > } > > > > +static void prepare_revs(struct rev_info *revs) > > +{ > > + int argc = 0; > > + int i; > > + const char **argv = xmalloc((commit_argc + 4) * sizeof(*argv)); > > + > > + argv[argc++] = NULL; > > + argv[argc++] = "--no-walk"; > > + if (action != REVERT) > > + argv[argc++] = "--reverse"; > > + for (i = 0; i < commit_argc; i++) > > + argv[argc++] = commit_argv[i]; > > + argv[argc++] = NULL; > > + > > + init_revisions(revs, NULL); > > + setup_revisions(argc - 1, argv, revs, NULL); > > + if (prepare_revision_walk(revs)) > > + die("revision walk setup failed"); > > + > > + if (!revs->commits) > > + die("empty commit set passed"); > > +} > > Tiny one-time leak. Maybe avoiding it will make debugging tools > happier. I added a "free(argv)". 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