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>
This commit is contained in:
Sverre Rabbelier 2010-03-28 00:42:48 -05:00 committed by Junio C Hamano
parent 0476228de5
commit bb6ad28c23

View File

@ -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) {