From df017019c28d4a504aa8d26ea10577d41255eebd Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 28 Dec 2017 05:33:49 +0000 Subject: [PATCH] Close cpfrom in an error case. CID: 271771 --- usr.bin/msgs/msgs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/msgs/msgs.c b/usr.bin/msgs/msgs.c index 6bd6a56fd9e7..f7a18e1682cb 100644 --- a/usr.bin/msgs/msgs.c +++ b/usr.bin/msgs/msgs.c @@ -804,6 +804,7 @@ ask(const char *prompt) mailing = NO; fseeko(newmsg, oldpos, SEEK_SET); ask(prompt); + fclose(cpfrom); return; }