Check fdopen return value.
Reviewed by: phk
This commit is contained in:
parent
2a8e7ac9c8
commit
76f23bd523
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170054
@ -407,6 +407,12 @@ DoFile(const char *savedir, const char *device)
|
|||||||
|
|
||||||
info = fdopen(fdinfo, "w");
|
info = fdopen(fdinfo, "w");
|
||||||
|
|
||||||
|
if (info == NULL) {
|
||||||
|
syslog(LOG_ERR, "fdopen failed: %m");
|
||||||
|
nerr++;
|
||||||
|
goto closefd;
|
||||||
|
}
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printheader(stdout, &kdhl, device, bounds, status);
|
printheader(stdout, &kdhl, device, bounds, status);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user