diff options
author | Sverre Rabbelier <srabbelier@gmail.com> | 2010-03-28 07:42:48 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-28 18:26:16 +0200 |
commit | bb6ad28c23f05e1ea04e3f1c6b9b08cc070c5318 (patch) | |
tree | 5100e323dca019e8870cb3e86c20610e42aeebde /builtin-fast-export.c | |
parent | Merge branch 'jc/color-attrs' into maint (diff) | |
download | git-bb6ad28c23f05e1ea04e3f1c6b9b08cc070c5318.tar.xz git-bb6ad28c23f05e1ea04e3f1c6b9b08cc070c5318.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | builtin-fast-export.c | 2 |
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) { |