Module Name: src
Committed By: martin
Date: Wed Dec 23 10:56:29 UTC 2015
Modified Files:
src/usr.sbin/isdn/isdnd: exec.c
Log Message:
David Binderman in PR 50578: fix resource leak in an error branch.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/isdn/isdnd/exec.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.sbin/isdn/isdnd/exec.c
diff -u src/usr.sbin/isdn/isdnd/exec.c:1.11 src/usr.sbin/isdn/isdnd/exec.c:1.12
--- src/usr.sbin/isdn/isdnd/exec.c:1.11 Fri Mar 2 02:58:46 2012
+++ src/usr.sbin/isdn/isdnd/exec.c Wed Dec 23 10:56:29 2015
@@ -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 @@ upd_callstat_file(char *filename, int ro
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;
}