Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/isdn/isdnd David Binderman in PR 50578: fix resourc...



details:   https://anonhg.NetBSD.org/src/rev/9c4a05082be9
branches:  trunk
changeset: 812607:9c4a05082be9
user:      martin <martin%NetBSD.org@localhost>
date:      Wed Dec 23 10:56:29 2015 +0000

description:
David Binderman in PR 50578: fix resource leak in an error branch.

diffstat:

 usr.sbin/isdn/isdnd/exec.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 1e8ee35a58de -r 9c4a05082be9 usr.sbin/isdn/isdnd/exec.c
--- a/usr.sbin/isdn/isdnd/exec.c        Wed Dec 23 10:43:35 2015 +0000
+++ b/usr.sbin/isdn/isdnd/exec.c        Wed Dec 23 10:56:29 2015 +0000
@@ -27,7 +27,7 @@
  *     exec.h - supplemental program/script execution
  *     ----------------------------------------------
  *
- *     $Id: exec.c,v 1.11 2012/03/02 02:58:46 joerg Exp $ 
+ *     $Id: exec.c,v 1.12 2015/12/23 10:56:29 martin Exp $ 
  *
  * $FreeBSD$
  *
@@ -368,7 +368,10 @@
                        nfp = fopen(buf, "w");
                        if (nfp == NULL)
                        {
-                               logit(LL_ERR, "ERROR, upd_callstat_file: cannot open for write %s, %s", buf, strerror(errno));
+                               logit(LL_ERR, "ERROR, upd_callstat_file: "
+                                   "cannot open for write %s, %s", buf,
+                                   strerror(errno));
+                               fclose(fp);
                                return;
                        }
 



Home | Main Index | Thread Index | Old Index