shithub: riscv

Download patch

ref: 659496081ef3517f09689678c070ad1967bd394e
parent: a13c5c3ddadb97c85fa606ac27e9d44f0c770d6f
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);