diff options
-rw-r--r-- | revision.c | 3 | ||||
-rw-r--r-- | revision.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/revision.c b/revision.c index 2e8aa3393a..6d329b46dc 100644 --- a/revision.c +++ b/revision.c @@ -1974,7 +1974,8 @@ int prepare_revision_walk(struct rev_info *revs) } e++; } - free(list); + if (!revs->leak_pending) + free(list); if (revs->no_walk) return 0; diff --git a/revision.h b/revision.h index 45412656dd..366a9b49b0 100644 --- a/revision.h +++ b/revision.h @@ -97,6 +97,7 @@ struct rev_info { date_mode_explicit:1, preserve_subject:1; unsigned int disable_stdin:1; + unsigned int leak_pending:1; enum date_mode date_mode; |