From 776f03d2040c3c08078d3c143ff875cf4f96e4b0 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Wed, 5 Mar 2014 04:15:17 +0000 Subject: [PATCH] Log the name of the device that we failed to open rather than an uninitialized buffer. MFC after: 3 days --- 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 bdbf7e384f3..ca2dafd6c00 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -618,7 +618,7 @@ DoFile(const char *savedir, const char *device) */ fdinfo = open(infoname, 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; }