summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--revision.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index ae12e11fb7..a50df66c50 100644
--- a/revision.c
+++ b/revision.c
@@ -1275,7 +1275,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)