From 49459cf1cd0b2b42f0c57bf99aac8ab7c8cfa2df Mon Sep 17 00:00:00 2001 From: markj Date: Tue, 29 Apr 2014 03:50:23 +0000 Subject: [PATCH] MFC r262775: Log the name of the file that we failed to open rather than an uninitialized buffer. git-svn-id: svn://svn.freebsd.org/base/stable/9@265076 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sbin/savecore/savecore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index 9265614d1..ab2961afa 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -549,7 +549,7 @@ DoFile(const char *savedir, const char *device) */ fdinfo = open(buf, O_WRONLY | O_CREAT | O_TRUNC, 0600); if (fdinfo < 0) { - syslog(LOG_ERR, "%s: %m", buf); + syslog(LOG_ERR, "%s: %m", infoname); nerr++; goto closefd; } -- 2.45.0