diff options
-rw-r--r-- | sbin/savecore/savecore.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index 0d88b20..88a6301 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -407,6 +407,12 @@ DoFile(const char *savedir, const char *device) info = fdopen(fdinfo, "w"); + if (info == NULL) { + syslog(LOG_ERR, "fdopen failed: %m"); + nerr++; + goto closefd; + } + if (verbose) printheader(stdout, &kdhl, device, bounds, status); |