Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSverre Rabbelier <srabbelier@gmail.com>2010-03-28 09:42:48 +0400
committerJunio C Hamano <gitster@pobox.com>2010-03-28 20:26:16 +0400
commitbb6ad28c23f05e1ea04e3f1c6b9b08cc070c5318 (patch)
tree5100e323dca019e8870cb3e86c20610e42aeebde
parent0476228de500049804ae599f557658c3f9042ad0 (diff)
fast-export: don't segfault when marks file cannot be opened
The error function only prints an error message, resulting in a segfault if we later on try to fprintf to a NULL handle. Fix this by using die_errno instead. Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin-fast-export.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-fast-export.c b/builtin-fast-export.c
index b0a4029c94..c6dd71a7bc 100644
--- a/builtin-fast-export.c
+++ b/builtin-fast-export.c
@@ -503,7 +503,7 @@ static void export_marks(char *file)
f = fopen(file, "w");
if (!f)
- error("Unable to open marks file %s for writing.", file);
+ die_errno("Unable to open marks file %s for writing.", file);
for (i = 0; i < idnums.size; i++) {
if (deco->base && deco->base->type == 1) {