From: Sverre Rabbelier Date: Sun, 28 Mar 2010 05:42:48 +0000 (-0500) Subject: fast-export: don't segfault when marks file cannot be opened X-Git-Tag: v1.7.0.4~15 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bb6ad28c23f05e1ea04e3f1c6b9b08cc070c5318;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/builtin-fast-export.c b/builtin-fast-export.c index b0a4029c9..c6dd71a7b 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) {