git: 9front

Download patch

ref: be46096f52f36694318e231e7f8504b7bef84ca0
parent: 42877db3d6a2b15bef7a82f4e115d84eeb719b1e
author: Igor Böhm <igor@9lab.org>
date: Wed Oct 6 09:37:39 EDT 2021

tweak: add missing return to fix double close(…) on file descriptor…
… and avoid printing conflicting messages.

--- a/sys/src/cmd/tweak.c
+++ b/sys/src/cmd/tweak.c
@@ -1731,6 +1731,7 @@
 		if(writeimage(fd, t->b, 0)<0 || (t->s && writesubfont(fd, t->s)<0)){
 			close(fd);
 			mesg("can't write %s: %r", t->name);
+			return;
 		}
 	t->mod = 0;
 	close(fd);
--