Module Name: src Committed By: dholland Date: Thu Dec 31 01:16:47 UTC 2015
Modified Files: src/usr.bin/msgs: msgs.c Log Message: Avoid leaking a file handle on error opening the next file. From David Binderman in PR 50577. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.bin/msgs/msgs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/msgs/msgs.c diff -u src/usr.bin/msgs/msgs.c:1.23 src/usr.bin/msgs/msgs.c:1.24 --- src/usr.bin/msgs/msgs.c:1.23 Fri Oct 18 20:47:06 2013 +++ src/usr.bin/msgs/msgs.c Thu Dec 31 01:16:47 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: msgs.c,v 1.23 2013/10/18 20:47:06 christos Exp $ */ +/* $NetBSD: msgs.c,v 1.24 2015/12/31 01:16:47 dholland Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)msgs.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: msgs.c,v 1.23 2013/10/18 20:47:06 christos Exp $"); +__RCSID("$NetBSD: msgs.c,v 1.24 2015/12/31 01:16:47 dholland Exp $"); #endif #endif /* not lint */ @@ -800,6 +800,7 @@ ask(const char *prompt) perror(fname); mailing = NO; fseek(newmsg, oldpos, 0); + fclose(cpfrom); ask(prompt); return; }