diff options
-rw-r--r-- | revision.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/revision.c b/revision.c index eb98128868..56d666d69a 100644 --- a/revision.c +++ b/revision.c @@ -1276,7 +1276,8 @@ static void read_revisions_from_stdin(struct rev_info *revs, } die("options not supported in --stdin mode"); } - if (handle_revision_arg(sb.buf, revs, 0, REVARG_CANNOT_BE_FILENAME)) + if (handle_revision_arg(xstrdup(sb.buf), revs, 0, + REVARG_CANNOT_BE_FILENAME)) die("bad revision '%s'", sb.buf); } if (seen_dashdash) |