Check fdopen return value.

Reviewed by: phk
This commit is contained in:
Kevin Lo 2007-05-28 09:48:25 +00:00
parent 2a8e7ac9c8
commit 76f23bd523
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170054

View File

@ -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);