log: fix memory leak in open_next_file()
[gitweb.git] / builtin / merge.c
index 703827f00668ca0df807f35e300f0927d00075cd..65a15018585ace678ef344bf4f1282fb46a00cbc 100644 (file)
@@ -839,9 +839,7 @@ static int suggest_conflicts(void)
        struct strbuf msgbuf = STRBUF_INIT;
 
        filename = git_path_merge_msg();
-       fp = fopen(filename, "a");
-       if (!fp)
-               die_errno(_("Could not open '%s' for writing"), filename);
+       fp = xfopen(filename, "a");
 
        append_conflicts_hint(&msgbuf);
        fputs(msgbuf.buf, fp);