From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/openrc:0.26.x commit in: src/rc/
Date: Tue, 30 May 2017 17:49:38 +0000 (UTC) [thread overview]
Message-ID: <1496165555.809c205c356992145b8781ae07a5d3c98b79a8c9.williamh@OpenRC> (raw)
commit: 809c205c356992145b8781ae07a5d3c98b79a8c9
Author: Sergei Trofimovich <slyfox <AT> inbox <DOT> ru>
AuthorDate: Tue May 30 07:47:55 2017 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue May 30 17:32:35 2017 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=809c205c
rc-logger.c: fix crash on fclose(NULL) (#137)
Only close the log if we successfully opened it.
Reported-by: Brian Evans <grknight <AT> gentoo.org>
Tested-by: Brian Evans <grknight <AT> gentoo.org>
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
src/rc/rc-logger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rc/rc-logger.c b/src/rc/rc-logger.c
index b4bd0eae..062ce3d9 100644
--- a/src/rc/rc-logger.c
+++ b/src/rc/rc-logger.c
@@ -261,12 +261,12 @@ rc_logger_open(const char *level)
break;
}
}
+ fclose(log);
} else {
log_error = 1;
eerror("Error: fopen(%s) failed: %s", TMPLOG, strerror(errno));
}
- fclose(log);
fclose(plog);
} else {
/*
next reply other threads:[~2017-05-30 17:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-30 17:49 William Hubbs [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-05-30 17:49 [gentoo-commits] proj/openrc:0.26.x commit in: src/rc/ William Hubbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1496165555.809c205c356992145b8781ae07a5d3c98b79a8c9.williamh@OpenRC \
--to=williamh@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox